NetBSD Problem Report #49194

From www@NetBSD.org  Thu Sep 11 08:00:03 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EDCE1CD33A
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Sep 2014 08:00:02 +0000 (UTC)
Message-Id: <20140911080001.9D4CDCD399@mollari.NetBSD.org>
Date: Thu, 11 Sep 2014 08:00:01 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Use false/true on boolean.
X-Send-Pr-Version: www-1.0

>Number:         49194
>Category:       bin
>Synopsis:       Use false/true on boolean.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 11 08:05:00 +0000 2014
>Closed-Date:    Thu Sep 11 08:23:23 +0000 2014
>Last-Modified:  Thu Sep 11 08:25: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;
 	    }

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 11 Sep 2014 08:23:23 +0000
State-Changed-Why:
Committed, thank you!


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49194 CVS commit: src/usr.bin/vgrind
Date: Thu, 11 Sep 2014 08:22:03 +0000

 Module Name:	src
 Committed By:	wiz
 Date:		Thu Sep 11 08:22:03 UTC 2014

 Modified Files:
 	src/usr.bin/vgrind: vfontedpr.c

 Log Message:
 Use false/true on boolean, not increment.
 From Henning Petersen in PR 49194.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 src/usr.bin/vgrind/vfontedpr.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.