summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-03-21 11:36:18 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-03-21 11:36:18 +0000
commit0806572164232ad7ce769bc504ac9437f39433fe (patch)
treeee4f35f814c816de804db05c26f2795099529cb9 /src
parent26197fc232d7c4a305f38e7b8a27654abb4e0e9b (diff)
downloadexecline-0806572164232ad7ce769bc504ac9437f39433fe.tar.xz
Use sig0_scan in trap.c
Diffstat (limited to 'src')
-rw-r--r--src/execline/trap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/execline/trap.c b/src/execline/trap.c
index dd6ae83..ea4a006 100644
--- a/src/execline/trap.c
+++ b/src/execline/trap.c
@@ -1,8 +1,7 @@
/* ISC license. */
-#include <skalibs/nonposix.h>
+#include <skalibs/nonposix.h> /* for SKALIBS_NSIG to work */
#include <string.h>
-#include <strings.h>
#include <errno.h>
#include <signal.h>
#include <skalibs/sgetopt.h>
@@ -77,8 +76,8 @@ int main (int argc, char const **argv, char const *const *envp)
while (i < (unsigned int)argc1)
{
int argc2 ;
- unsigned int sig = (unsigned int)sig_number(argv[i] + (strncasecmp(argv[i], "sig", 3) ? 0 : 3)) ;
- if (!sig && !uint0_scan(argv[i], &sig) && strcasecmp(argv[i], "timeout"))
+ int sig = 0 ;
+ if (!sig0_scan(argv[i], &sig) && strcasecmp(argv[i], "timeout"))
strerr_dief3x(100, "unrecognized", " directive: ", argv[i]) ;
argc2 = el_semicolon(argv + ++i) ;
if (!argc2)