[hackers] [sbase] Add special signal to the sigs table instead || sin

From: <git_AT_suckless.org>
Date: Tue, 11 Nov 2014 18:43:13 +0100

commit 63f9f1ac14dbf1883f4cdb361fc5b26bad848c82
Author: sin <sin_AT_2f30.org>
Date: Tue Nov 11 17:42:43 2014 +0000

    Add special signal to the sigs table instead

diff --git a/kill.c b/kill.c
index 2ac022d..fbb79b7 100644
--- a/kill.c
+++ b/kill.c
_AT_@ -15,6 +15,7 @@ struct {
         const char *name;
         int sig;
 } sigs[] = {
+ { "0", 0 },
 #define SIG(n) { #n, SIG##n }
         SIG(ABRT), SIG(ALRM), SIG(BUS), SIG(CHLD), SIG(CONT), SIG(FPE), SIG(HUP),
         SIG(ILL), SIG(INT), SIG(KILL), SIG(PIPE), SIG(QUIT), SIG(SEGV), SIG(STOP),
_AT_@ -115,8 +116,6 @@ sig2name(int sig)
 {
         size_t i;
 
- if (sig == 0)
- return "0";
         for (i = 0; i < LEN(sigs); i++)
                 if (sigs[i].sig == sig)
                         return sigs[i].name;
_AT_@ -130,8 +129,6 @@ name2sig(const char *name)
 {
         size_t i;
 
- if (strcmp(name, "0") == 0)
- return 0;
         for (i = 0; i < LEN(sigs); i++)
                 if (strcasecmp(sigs[i].name, name) == 0)
                         return sigs[i].sig;
Received on Tue Nov 11 2014 - 18:43:13 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 11 2014 - 18:48:10 CET