Add definition of nitems for those without it and use it throughout.

This commit is contained in:
Todd C. Miller
2016-06-23 10:58:07 -06:00
parent ff2cd3cf27
commit f683cbd582
9 changed files with 19 additions and 21 deletions

View File

@@ -81,7 +81,7 @@ static const char *const sudo_debug_default_subsystems[] = {
NULL
};
#define NUM_DEF_SUBSYSTEMS (sizeof(sudo_debug_default_subsystems) / sizeof(sudo_debug_default_subsystems[0]) - 1)
#define NUM_DEF_SUBSYSTEMS (nitems(sudo_debug_default_subsystems) - 1)
/*
* For multiple programs/plugins there is a per-program instance