summaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-25 10:55:35 +0000
committerDenis Vlasenko2007-06-25 10:55:35 +0000
commit80b8b39899a09c7516920cda5fd343b3086d4824 (patch)
treeaa9903fd6b64d19c5f640fa302272d85c92b204e /shell/msh.c
parent1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff)
downloadbusybox-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.c6
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