kflag and wflag don't need to be counters; wflag only needs to know if
authorokan <okan@openbsd.org>
Thu, 9 Apr 2015 19:48:25 +0000 (19:48 +0000)
committerokan <okan@openbsd.org>
Thu, 9 Apr 2015 19:48:25 +0000 (19:48 +0000)
greater than 0 for its one test case.

ok deraadt

bin/ps/ps.c

index 56eb265..c33837f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ps.c,v 1.63 2015/01/16 06:39:32 deraadt Exp $ */
+/*     $OpenBSD: ps.c,v 1.64 2015/04/09 19:48:25 okan Exp $    */
 /*     $NetBSD: ps.c,v 1.15 1995/05/18 20:33:25 mycroft Exp $  */
 
 /*-
@@ -158,7 +158,7 @@ main(int argc, char *argv[])
                        jfmt[0] = '\0';
                        break;
                case 'k':
-                       kflag++;
+                       kflag = 1;
                        break;
                case 'L':
                        showkey();
@@ -248,7 +248,7 @@ main(int argc, char *argv[])
                                termwidth = UNLIMITED;
                        else if (termwidth < 131)
                                termwidth = 131;
-                       wflag++;
+                       wflag = 1;
                        break;
                case 'x':
                        xflg = 1;