Don't hide global `s'.

This commit is contained in:
ru 2003-01-17 08:10:43 +00:00
parent 998d7c398f
commit de5a5cffdf

View File

@ -220,7 +220,7 @@ file(char *name)
{
FILE *fp;
int i, retval;
char line[100], arg[5][50], *args[5], *s;
char line[100], arg[5][50], *args[5], *p;
if ((fp = fopen(name, "r")) == NULL)
errx(1, "cannot open %s", name);
@ -231,12 +231,12 @@ file(char *name)
args[4] = &arg[4][0];
retval = 0;
while(fgets(line, 100, fp) != NULL) {
if ((s = strchr(line, '#')) != NULL)
*s = '\0';
for (s = line; isblank(*s); s++);
if (*s == '\0')
if ((p = strchr(line, '#')) != NULL)
*p = '\0';
for (p = line; isblank(*p); p++);
if (*p == '\0')
continue;
i = sscanf(s, "%49s %49s %49s %49s %49s", arg[0], arg[1],
i = sscanf(p, "%49s %49s %49s %49s %49s", arg[0], arg[1],
arg[2], arg[3], arg[4]);
if (i < 2) {
warnx("bad line: %s", line);