svn commit: r303547 - head/usr.bin/indent
Marcelo Araujo
araujo at FreeBSD.org
Sat Jul 30 07:28:17 UTC 2016
Author: araujo
Date: Sat Jul 30 07:28:15 2016
New Revision: 303547
URL: https://svnweb.freebsd.org/changeset/base/303547
Log:
Use nitems() from sys/param.h.
MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)
Modified:
head/usr.bin/indent/indent.c
Modified: head/usr.bin/indent/indent.c
==============================================================================
--- head/usr.bin/indent/indent.c Sat Jul 30 07:15:54 2016 (r303546)
+++ head/usr.bin/indent/indent.c Sat Jul 30 07:28:15 2016 (r303547)
@@ -1138,7 +1138,7 @@ check_type:
while ((c = getc(input)) == '\n');
ungetc(c, input);
}
- if ((size_t)ifdef_level < sizeof(state_stack)/sizeof(state_stack[0])) {
+ if ((size_t)ifdef_level < nitems(state_stack)) {
match_state[ifdef_level].tos = -1;
state_stack[ifdef_level++] = ps;
}
More information about the svn-src-head
mailing list