diff --git a/sbin/setkey/setkey.c b/sbin/setkey/setkey.c index d9b905ad845..f7268d8f1e1 100644 --- a/sbin/setkey/setkey.c +++ b/sbin/setkey/setkey.c @@ -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)