NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/49194: Use false/true on boolean.



>Number:         49194
>Category:       bin
>Synopsis:       Use false/true on boolean.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 11 08:05:00 +0000 2014
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Use false/true on boolean and not increment.
>How-To-Repeat:

>Fix:
diff -u -p -r1.15 vfontedpr.c
--- usr.bin/vgrind/vfontedpr.c  15 Jul 2014 13:17:15 -0000      1.15
+++ usr.bin/vgrind/vfontedpr.c  3 Sep 2014 07:46:55 -0000
@@ -163,7 +163,7 @@ main(int argc, char *argv[])
 
            /* act as a filter like eqn */
            if (!strcmp(argv[0], "-f")) {
-               filter++;
+               filter=true;
                argv[0] = argv[argc-1];
                argv[argc-1] = minus;
                continue;
@@ -177,13 +177,13 @@ main(int argc, char *argv[])
 
            /* build an index */
            if (!strcmp(argv[0], "-x")) {
-               idx++;
+               idx=true;
                argv[0] = minusn;
            }
 
            /* indicate no keywords */
            if (!strcmp(argv[0], "-n")) {
-               nokeyw++;
+               nokeyw=true;
                argc--, argv++;
                continue;
            }



Home | Main Index | Thread Index | Old Index