From bbda98f14c66fb573bc75ff3b9222697d2ffa8fb Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 4 Dec 2006 15:58:27 +0000 Subject: - cosmetic change to avoid warnings about eventual padding/packing. --- libbb/u_signal_names.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libbb') diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c index 3f8c04c..88311dd 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))) -- cgit v1.1