Coding style fix: Use "foo = 1" instead of "foo++" to assign
the truth value to a boolean variable, especially when inside a loop. The variable can overflow otherwise, at least in theory.
This commit is contained in:
parent
018319c226
commit
8b52276d10
@ -356,7 +356,7 @@ main(int argc, char *argv[])
|
|||||||
else if (islower(*p))
|
else if (islower(*p))
|
||||||
lower = 1;
|
lower = 1;
|
||||||
else if (isdigit(*p))
|
else if (isdigit(*p))
|
||||||
digit++;
|
digit = 1;
|
||||||
*q++ = *p++;
|
*q++ = *p++;
|
||||||
}
|
}
|
||||||
} else if (!(PL && PP))
|
} else if (!(PL && PP))
|
||||||
@ -604,7 +604,7 @@ getname(void)
|
|||||||
np = name;
|
np = name;
|
||||||
continue;
|
continue;
|
||||||
} else if (isdigit(c))
|
} else if (isdigit(c))
|
||||||
digit++;
|
digit = 1;
|
||||||
if (IG && (c <= ' ' || c > 0176))
|
if (IG && (c <= ' ' || c > 0176))
|
||||||
continue;
|
continue;
|
||||||
*np++ = c;
|
*np++ = c;
|
||||||
|
Loading…
Reference in New Issue
Block a user