mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
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)
This commit is contained in:
parent
4201dd1143
commit
7f720f5410
@ -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 -------------------------
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user