diff options
author | Elliott Hughes <enh@google.com> | 2019-03-03 22:42:26 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-04 07:30:47 -0600 |
commit | 6d1eb1ce40801323b65401a70ae5f9782939eeb4 (patch) | |
tree | d94f6577702a8b626c3a4d4e1d1991868681cdda /lib | |
parent | 9be2e85165c3b93c87f63209c3597559333b1fc3 (diff) | |
download | toybox-6d1eb1ce40801323b65401a70ae5f9782939eeb4.tar.gz |
Consistently use ARRAY_LEN.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -907,7 +907,7 @@ int sig_to_num(char *pidstr) if (!strncasecmp(pidstr, "sig", 3)) pidstr+=3; } - for (i = 0; i < sizeof(signames)/sizeof(struct signame); i++) + for (i=0; i<ARRAY_LEN(signames); i++) if (!pidstr) xputs(signames[i].name); else if (!strcasecmp(pidstr, signames[i].name)) return signames[i].num; @@ -918,7 +918,7 @@ char *num_to_sig(int sig) { int i; - for (i=0; i<sizeof(signames)/sizeof(struct signame); i++) + for (i=0; i<ARRAY_LEN(signames); i++) if (signames[i].num == sig) return signames[i].name; return NULL; } |