INN commit: trunk/innd (art.c)
INN Commit
rra at isc.org
Tue Jun 14 19:09:54 UTC 2011
Date: Tuesday, June 14, 2011 @ 12:09:53
Author: iulius
Revision: 9207
Build INN with the new "-Wunused-but-set-variable" GCC 4.6.0 warning.
Remove unused "c" variable.
Well, better rewrite the function at the same time.
Thanks to Russ Allbery for the new array parsing code.
Modified:
trunk/innd/art.c
-------+
art.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
Modified: art.c
===================================================================
--- art.c 2011-06-14 19:07:37 UTC (rev 9206)
+++ art.c 2011-06-14 19:09:53 UTC (rev 9207)
@@ -1554,18 +1554,17 @@
/*
** Return true if a list of strings has a specific one. This is a
-** generic routine, but is used for seeing if a host is in the Path line.
+** generic routine, but is used for seeing if a host is in the Path: line.
*/
static bool
ListHas(const char **list, const char *p)
{
- const char *q;
- char c;
-
- for (c = *p; (q = *list) != NULL; list++)
- if (strcasecmp(p, q) == 0)
- return true;
- return false;
+ size_t i;
+
+ for (i = 0; list[i] != NULL; i++)
+ if (strcasecmp(p, list[i]) == 0)
+ return true;
+ return false;
}
/*
More information about the inn-committers
mailing list