diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2024-09-14 13:15:20 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2024-09-21 21:19:49 +0000 |
| commit | 50c03711f28a69e6e1811414abd8e4d191d3445d (patch) | |
| tree | 0568e01780b143450a87b5e62ea711a95ef30f87 /usr.bin/procstat | |
| parent | ba08efe3f2ffd0e1ac6fdd417e04f6495a0560c5 (diff) | |
Diffstat (limited to 'usr.bin/procstat')
| -rw-r--r-- | usr.bin/procstat/procstat_rlimit.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/procstat/procstat_rlimit.c b/usr.bin/procstat/procstat_rlimit.c index f2dcfcd47327..f930d5b0aee0 100644 --- a/usr.bin/procstat/procstat_rlimit.c +++ b/usr.bin/procstat/procstat_rlimit.c @@ -48,7 +48,7 @@ static struct { const char *name; const char *suffix; -} rlimit_param[15] = { +} rlimit_param[] = { {"cputime", "sec"}, {"filesize", "B "}, {"datasize", "B "}, @@ -66,9 +66,8 @@ static struct { {"umtxp", " "}, }; -#if RLIM_NLIMITS > 15 -#error "Resource limits have grown. Add new entries to rlimit_param[]." -#endif +_Static_assert(nitems(rlimit_param) == RLIM_NLIMITS, + "Resource limits have grown. Add new entries to rlimit_param[]."); static const char * humanize_rlimit(int indx, rlim_t limit) |
