diff options
author | Denis Vlasenko | 2007-06-25 10:55:35 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-06-25 10:55:35 +0000 |
commit | 80b8b39899a09c7516920cda5fd343b3086d4824 (patch) | |
tree | aa9903fd6b64d19c5f640fa302272d85c92b204e /shell/msh.c | |
parent | 1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff) | |
download | busybox-80b8b39899a09c7516920cda5fd343b3086d4824.zip busybox-80b8b39899a09c7516920cda5fd343b3086d4824.tar.gz |
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
Diffstat (limited to 'shell/msh.c')
-rw-r--r-- | shell/msh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/msh.c b/shell/msh.c index 2328e07..effdc01 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -596,7 +596,7 @@ static const char * const signame[] = { "Terminated", }; -#define NSIGNAL (sizeof(signame)/sizeof(signame[0])) + struct res { const char *r_name; @@ -2997,7 +2997,7 @@ static int waitfor(int lastpid, int canintr) } else { rv = WAITSIG(s); if (rv != 0) { - if (rv < NSIGNAL) { + if (rv < ARRAY_SIZE(signame)) { if (signame[rv] != NULL) { if (pid != lastpid) { prn(pid); @@ -3016,7 +3016,7 @@ static int waitfor(int lastpid, int canintr) } if (WAITCORE(s)) prs(" - core dumped"); - if (rv >= NSIGNAL || signame[rv]) + if (rv >= ARRAY_SIZE(signame) || signame[rv]) prs("\n"); rv = -1; } else |