]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: drop unused variables & RETSIGTYPE
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 4 Mar 2015 06:18:24 +0000 (07:18 +0100)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 8 Jun 2016 17:55:07 +0000 (13:55 -0400)
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)

configure.ac
vtysh/vtysh_main.c

index a30ec00074ac672c1d67bd18e5b3cac29ee72962..0a3e370a708aa8c4298756c56c747606b559956c 100755 (executable)
@@ -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 -------------------------
index 41104eaee6da13f1041b7616a840b7f77f724eb4..cd21c94efdba32a05761df0979f46cd9c242d2fe 100644 (file)
@@ -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. */