Subject: bin/25097: incorrect conditional statement in src/dist/ipf/tools/ipfstat.c
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 04/08/2004 04:59:07
>Number:         25097
>Category:       bin
>Synopsis:       incorrect conditional statement in src/dist/ipf/tools/ipfstat.c
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 07 20:00:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Kouichirou Hiratsuka
>Release:        NetBSD 2.0_BETA
>Organization:
>Environment:
System: NetBSD firefly.localdomain 2.0_BETA NetBSD 2.0_BETA (FIREFLY.MP) #1: Wed Apr 7 21:34:43 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
	At src/dist/ipf/tools/ipfstat.c line 1319, position of braket is
	incorrect. Therefore this conditional statement is incorrect, too.

>How-To-Repeat:
>Fix:
Index: ipfstat.c
===================================================================
RCS file: /cvsroot/src/dist/ipf/tools/ipfstat.c,v
retrieving revision 1.2
diff -u -r1.2 ipfstat.c
--- ipfstat.c	7 Apr 2004 17:28:54 -0000	1.2
+++ ipfstat.c	7 Apr 2004 19:50:19 -0000
@@ -1316,7 +1316,7 @@
 	 */
 	PRINTF("\n");
 	for (i = 0; i < IPFT_SIZE; i++)
-		while (ipfrtab[i != NULL]) {
+		while (ipfrtab[i] != NULL) {
 			if (kmemcpy((char *)&ifr, (u_long)ipfrtab[i],
 				    sizeof(ifr)) == -1)
 				break;
>Release-Note:
>Audit-Trail:
>Unformatted: