mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-21 18:50:50 +01:00
setkey: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888 Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
parent
70fad8acae
commit
d94c991f3b
@ -502,7 +502,7 @@ static const char *ipproto[] = {
|
||||
};
|
||||
|
||||
#define STR_OR_ID(x, tab) \
|
||||
(((x) < sizeof(tab)/sizeof(tab[0]) && tab[(x)]) ? tab[(x)] : numstr(x))
|
||||
(((x) < nitems(tab) && tab[(x)]) ? tab[(x)] : numstr(x))
|
||||
|
||||
const char *
|
||||
numstr(int x)
|
||||
|
Loading…
Reference in New Issue
Block a user