limit(1): fix always true condition
authorEitan Adler <lists@eitanadler.com>
Sun, 21 Jan 2018 09:01:26 +0000 (01:01 -0800)
committerEitan Adler <lists@eitanadler.com>
Sun, 28 Jan 2018 00:37:33 +0000 (16:37 -0800)
usr.bin/limits/limits.c

index 8782a74..9bea41e 100644 (file)
@@ -465,7 +465,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) {