Source-Changes-HG archive

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

[src/trunk]: src/dist/ipf/tools Compiler warning on a for loop that does not ...



details:   https://anonhg.NetBSD.org/src/rev/e198c6a2732a
branches:  trunk
changeset: 773460:e198c6a2732a
user:      darrenr <darrenr%NetBSD.org@localhost>
date:      Thu Feb 02 19:18:51 2012 +0000

description:
Compiler warning on a for loop that does not terminate correctly

diffstat:

 dist/ipf/tools/ipfcomp.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 93a977ff305c -r e198c6a2732a dist/ipf/tools/ipfcomp.c
--- a/dist/ipf/tools/ipfcomp.c  Thu Feb 02 18:59:44 2012 +0000
+++ b/dist/ipf/tools/ipfcomp.c  Thu Feb 02 19:18:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipfcomp.c,v 1.5 2012/01/30 16:12:05 darrenr Exp $      */
+/*     $NetBSD: ipfcomp.c,v 1.6 2012/02/02 19:18:51 darrenr Exp $      */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -389,7 +389,7 @@
 extern frentry_t *ipf_rules_out_%s[%d];\n",
                        grp->fg_name, grp->fg_name, outcount);
 
-               for (g = groups; g != g; g = g->fg_next)
+               for (g = groups; g != grp; g = g->fg_next)
                        if ((strncmp(g->fg_name, grp->fg_name,
                                     FR_GROUPLEN) == 0) &&
                            g->fg_flags == grp->fg_flags)



Home | Main Index | Thread Index | Old Index