From 7275057a5edbc84064aad18ab09d0b0976b23cd8 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Sun, 21 Jan 2018 08:48:26 +0000 Subject: limits(1): fix always true condition Reviewed by: imp MFC After: 1 week --- usr.bin/limits/limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index cd242bc687840..c0c652d065acc 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -509,7 +509,7 @@ main(int argc, char *argv[]) for (rcswhich = 0; rcswhich < RLIM_NLIMITS; rcswhich++) { if (doall || num_limits == 0 || which_limits[rcswhich] != 0) { - if (which_limits[rcswhich] == ANY || which_limits[rcswhich]) + if (which_limits[rcswhich] == ANY) which_limits[rcswhich] = type; if (shellparm[shelltype].lprm[rcswhich].pfx) { if (shellparm[shelltype].both && limits[rcswhich].rlim_cur == limits[rcswhich].rlim_max) { -- cgit v1.2.3