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>
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index d243670..aa7d021 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -98,10 +98,9 @@
/* Signale wrapper for vtysh. We don't use sigevent because
* vtysh doesn't use threads. TODO */
-RETSIGTYPE *
+static void
vtysh_signal_set (int signo, void (*func)(int))
{
- int ret;
struct sigaction sig;
struct sigaction osig;
@@ -112,12 +111,7 @@
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. */