diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2015-03-04 07:18:24 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-08 19:55:07 +0200 |
commit | 7f720f5410676f166841f5fb912bad1d30de8d63 (patch) | |
tree | df93b904f924e12b50ce879f7776ad0a42d46200 /vtysh | |
parent | vtysh: fix function prototypes (diff) | |
download | frr-7f720f5410676f166841f5fb912bad1d30de8d63.tar.xz frr-7f720f5410676f166841f5fb912bad1d30de8d63.zip |
vtysh: drop unused variables & RETSIGTYPE
Drop unused return values in vtysh. Also gets rid of the rather funny
prototyping of signal setup in vtysh - which as a side effect makes it
not need AC_TYPE_SIGNAL in configure.ac anymore. It wasn't used
sensibly to begin with...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 6769f43de9d595b935f2ebf1cae1428e1d1a3a5f)
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh_main.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 41104eaee..cd21c94ef 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -124,10 +124,9 @@ sigint (int sig) /* Signale wrapper for vtysh. We don't use sigevent because * vtysh doesn't use threads. TODO */ -static RETSIGTYPE * +static void vtysh_signal_set (int signo, void (*func)(int)) { - int ret; struct sigaction sig; struct sigaction osig; @@ -138,12 +137,7 @@ vtysh_signal_set (int signo, void (*func)(int)) sig.sa_flags |= SA_RESTART; #endif /* SA_RESTART */ - ret = sigaction (signo, &sig, &osig); - - if (ret < 0) - return (SIG_ERR); - else - return (osig.sa_handler); + sigaction (signo, &sig, &osig); } /* Initialization of signal handles. */ |