summaryrefslogtreecommitdiff
path: root/libbb/u_signal_names.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-12-04 15:58:27 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-12-04 15:58:27 +0000
commitbbda98f14c66fb573bc75ff3b9222697d2ffa8fb (patch)
treed745bc2dd0dec88231aa0994d3c4060e234581db /libbb/u_signal_names.c
parentbb59f02218d326fa91bf1ade23232340bee317be (diff)
downloadbusybox-bbda98f14c66fb573bc75ff3b9222697d2ffa8fb.tar.gz
- cosmetic change to avoid warnings about eventual padding/packing.
Diffstat (limited to 'libbb/u_signal_names.c')
-rw-r--r--libbb/u_signal_names.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index 3f8c04c35..88311dd9c 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -10,18 +10,18 @@
#include "libbb.h"
static const struct signal_name {
- char name[5];
int number;
+ char name[5];
} signals[] = {
// SUSv3 says kill must support these, and specifies the numerical values,
// http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html
- {"0", 0}, {"HUP", 1}, {"INT", 2}, {"QUIT", 3}, {"ABRT", 6}, {"KILL", 9},
- {"ALRM", 14}, {"TERM", 15},
+ {0, "0"}, {1, "HUP"}, {2, "INT"}, {3, "QUIT"}, {6, "ABRT"}, {9, "KILL"},
+ {14, "ALRM"}, {15, "TERM"},
// And Posix adds the following:
- {"ILL", SIGILL}, {"TRAP", SIGTRAP}, {"FPE", SIGFPE}, {"USR1", SIGUSR1},
- {"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD},
- {"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN},
- {"TTOU", SIGTTOU}
+ {SIGILL, "ILL"}, {SIGTRAP, "TRAP"}, {SIGFPE, "FPE"}, {SIGUSR1, "USR1"},
+ {SIGSEGV, "SEGV"}, {SIGUSR2, "USR2"}, {SIGPIPE, "PIPE"}, {SIGCHLD, "CHLD"},
+ {SIGCONT, "CONT"}, {SIGSTOP, "STOP"}, {SIGTSTP, "TSTP"}, {SIGTTIN, "TTIN"},
+ {SIGTTOU, "TTOU"}
};
// Convert signal name to number.
@@ -31,8 +31,8 @@ int get_signum(const char *name)
int i;
i = atoi(name);
- if(i) return i;
- for(i=0; i < sizeof(signals) / sizeof(struct signal_name); i++)
+ if (i) return i;
+ for (i = 0; i < sizeof(signals) / sizeof(struct signal_name); i++)
if (!strcasecmp(signals[i].name, name) ||
(!strncasecmp(signals[i].name, "SIG", 3)
&& !strcasecmp(signals[i].name+3, signals[i].name)))