- cosmetic change to avoid warnings about eventual padding/packing.

This commit is contained in:
Bernhard Reutner-Fischer 2006-12-04 15:58:27 +00:00
parent bb59f02218
commit bbda98f14c

View File

@ -10,18 +10,18 @@
#include "libbb.h" #include "libbb.h"
static const struct signal_name { static const struct signal_name {
char name[5];
int number; int number;
char name[5];
} signals[] = { } signals[] = {
// SUSv3 says kill must support these, and specifies the numerical values, // SUSv3 says kill must support these, and specifies the numerical values,
// http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html // http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html
{"0", 0}, {"HUP", 1}, {"INT", 2}, {"QUIT", 3}, {"ABRT", 6}, {"KILL", 9}, {0, "0"}, {1, "HUP"}, {2, "INT"}, {3, "QUIT"}, {6, "ABRT"}, {9, "KILL"},
{"ALRM", 14}, {"TERM", 15}, {14, "ALRM"}, {15, "TERM"},
// And Posix adds the following: // And Posix adds the following:
{"ILL", SIGILL}, {"TRAP", SIGTRAP}, {"FPE", SIGFPE}, {"USR1", SIGUSR1}, {SIGILL, "ILL"}, {SIGTRAP, "TRAP"}, {SIGFPE, "FPE"}, {SIGUSR1, "USR1"},
{"SEGV", SIGSEGV}, {"USR2", SIGUSR2}, {"PIPE", SIGPIPE}, {"CHLD", SIGCHLD}, {SIGSEGV, "SEGV"}, {SIGUSR2, "USR2"}, {SIGPIPE, "PIPE"}, {SIGCHLD, "CHLD"},
{"CONT", SIGCONT}, {"STOP", SIGSTOP}, {"TSTP", SIGTSTP}, {"TTIN", SIGTTIN}, {SIGCONT, "CONT"}, {SIGSTOP, "STOP"}, {SIGTSTP, "TSTP"}, {SIGTTIN, "TTIN"},
{"TTOU", SIGTTOU} {SIGTTOU, "TTOU"}
}; };
// Convert signal name to number. // Convert signal name to number.
@ -31,8 +31,8 @@ int get_signum(const char *name)
int i; int i;
i = atoi(name); i = atoi(name);
if(i) return i; if (i) return i;
for(i=0; i < sizeof(signals) / sizeof(struct signal_name); i++) for (i = 0; i < sizeof(signals) / sizeof(struct signal_name); i++)
if (!strcasecmp(signals[i].name, name) || if (!strcasecmp(signals[i].name, name) ||
(!strncasecmp(signals[i].name, "SIG", 3) (!strncasecmp(signals[i].name, "SIG", 3)
&& !strcasecmp(signals[i].name+3, signals[i].name))) && !strcasecmp(signals[i].name+3, signals[i].name)))