aboutsummaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
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 2328e0734..effdc0107 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -596,7 +596,7 @@ static const char * const signame[] = {
596 "Terminated", 596 "Terminated",
597}; 597};
598 598
599#define NSIGNAL (sizeof(signame)/sizeof(signame[0])) 599
600 600
601struct res { 601struct res {
602 const char *r_name; 602 const char *r_name;
@@ -2997,7 +2997,7 @@ static int waitfor(int lastpid, int canintr)
2997 } else { 2997 } else {
2998 rv = WAITSIG(s); 2998 rv = WAITSIG(s);
2999 if (rv != 0) { 2999 if (rv != 0) {
3000 if (rv < NSIGNAL) { 3000 if (rv < ARRAY_SIZE(signame)) {
3001 if (signame[rv] != NULL) { 3001 if (signame[rv] != NULL) {
3002 if (pid != lastpid) { 3002 if (pid != lastpid) {
3003 prn(pid); 3003 prn(pid);
@@ -3016,7 +3016,7 @@ static int waitfor(int lastpid, int canintr)
3016 } 3016 }
3017 if (WAITCORE(s)) 3017 if (WAITCORE(s))
3018 prs(" - core dumped"); 3018 prs(" - core dumped");
3019 if (rv >= NSIGNAL || signame[rv]) 3019 if (rv >= ARRAY_SIZE(signame) || signame[rv])
3020 prs("\n"); 3020 prs("\n");
3021 rv = -1; 3021 rv = -1;
3022 } else 3022 } else