diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-05 20:26:54 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-06 01:17:30 -0400 |
commit | 0813a80223e40a5d122dfa86ea41e7b1c986f093 (patch) | |
tree | 5db7aa55008ae1cb076c959849d0cd5481d3fed4 /src/rc | |
parent | 3969cb2a85d798cd029043566d97aad66dcee8e5 (diff) |
add a new ARRAY_SIZE macro and use it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/start-stop-daemon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index 965b3312..d1eb8a5d 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -192,7 +192,7 @@ parse_signal(const char *sig) else s = NULL; - for (i = 0; i < sizeof(signallist) / sizeof(signallist[0]); i++) + for (i = 0; i < ARRAY_SIZE(signallist); ++i) if (strcmp(sig, signallist[i].name) == 0 || (s && strcmp(s, signallist[i].name) == 0)) return signallist[i].signal; |