summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-03-04 07:18:24 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-06-08 19:55:07 +0200
commit7f720f5410676f166841f5fb912bad1d30de8d63 (patch)
treedf93b904f924e12b50ce879f7776ad0a42d46200
parentvtysh: fix function prototypes (diff)
downloadfrr-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)
-rwxr-xr-xconfigure.ac1
-rw-r--r--vtysh/vtysh_main.c10
2 files changed, 2 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index a30ec0007..0a3e370a7 100755
--- a/configure.ac
+++ b/configure.ac
@@ -469,7 +469,6 @@ dnl AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
-AC_TYPE_SIGNAL
AC_STRUCT_TM
dnl -------------------------
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. */