fixing loop counter init after compiler complaints
Alex
alexander.stohr at gmx.de
Fri Aug 12 07:50:46 PDT 2005
the valptr is uninitialized or has random value
so it wont be good to use it for a loop initalisation.
instead the value pointer previousely got assigned with this:
cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)
to my best understanding this is a needed fix.
i got hinted for it by a compiler warning.
-Alex.
diff -u -U 8 conf.c.orig conf.c
--- conf.c.orig 2005-06-27 04:59:29.000000000 +0200
+++ conf.c 2005-08-12 17:02:15.430347800 +0200
@@ -2277,17 +2277,17 @@
}
else if ((!strcasecmp(line, "Allow") || !strcasecmp(line, "Deny")) && op)
{
/*
* Allow line, @group, @OWNER
* Deny line, @group, @OWNER
*/
- for (value = valptr; *value;)
+ while (*value)
{
while (isspace(*value & 255))
value ++;
if (*value == '\"' || *value == '\'')
{
/*
* Grab quoted name...
More information about the cups
mailing list