mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-21 08:24:10 +01:00
getconf: use nitems(..) to compute NWORDS instead of hardcoding
the equivalent macro MFC after: 1 month Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
ead8d64aed
commit
df630de5e1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318280
@ -36,7 +36,8 @@ state == 1 { print; next; }
|
||||
state = 3;
|
||||
print "\t{ NULL, 0, 0 }";
|
||||
print "};";
|
||||
print "#define\tNWORDS\t(sizeof(wordlist)/sizeof(wordlist[0]) - 1)";
|
||||
print "#include <sys/param.h>";
|
||||
print "#define\tNWORDS\t(nitems(wordlist) - 1)";
|
||||
print "static const struct map *";
|
||||
print "in_word_set(const char *word)";
|
||||
print "{";
|
||||
|
Loading…
Reference in New Issue
Block a user