ash: cleanup part 3
This commit is contained in:
22
shell/ash.c
22
shell/ash.c
@@ -1190,9 +1190,9 @@ varcmp(const char *p, const char *q)
|
|||||||
q++;
|
q++;
|
||||||
}
|
}
|
||||||
if (c == '=')
|
if (c == '=')
|
||||||
c = 0;
|
c = '\0';
|
||||||
if (d == '=')
|
if (d == '=')
|
||||||
d = 0;
|
d = '\0';
|
||||||
out:
|
out:
|
||||||
return c - d;
|
return c - d;
|
||||||
}
|
}
|
||||||
@@ -1469,7 +1469,8 @@ listsetvar(struct strlist *list_set_var, int flags)
|
|||||||
INT_OFF;
|
INT_OFF;
|
||||||
do {
|
do {
|
||||||
setvareq(lp->text, flags);
|
setvareq(lp->text, flags);
|
||||||
} while ((lp = lp->next));
|
lp = lp->next;
|
||||||
|
} while (lp);
|
||||||
INT_ON;
|
INT_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3790,7 +3791,8 @@ parse_command_args(char **argv, const char **path)
|
|||||||
/* run 'typecmd' for other options */
|
/* run 'typecmd' for other options */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} while ((c = *cp++));
|
c = *cp++;
|
||||||
|
} while (c);
|
||||||
}
|
}
|
||||||
return argv;
|
return argv;
|
||||||
}
|
}
|
||||||
@@ -6025,7 +6027,10 @@ ifsbreakup(char *string, struct arglist *arglist)
|
|||||||
q = p;
|
q = p;
|
||||||
if (*p == CTLESC)
|
if (*p == CTLESC)
|
||||||
p++;
|
p++;
|
||||||
if (strchr(ifs, *p)) {
|
if (!strchr(ifs, *p)) {
|
||||||
|
p++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!nulonly)
|
if (!nulonly)
|
||||||
ifsspc = (strchr(defifs, *p) != NULL);
|
ifsspc = (strchr(defifs, *p) != NULL);
|
||||||
/* Ignore IFS whitespace at start */
|
/* Ignore IFS whitespace at start */
|
||||||
@@ -6064,10 +6069,9 @@ ifsbreakup(char *string, struct arglist *arglist)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
start = p;
|
start = p;
|
||||||
} else
|
} /* while */
|
||||||
p++;
|
ifsp = ifsp->next;
|
||||||
}
|
} while (ifsp != NULL);
|
||||||
} while ((ifsp = ifsp->next) != NULL);
|
|
||||||
if (nulonly)
|
if (nulonly)
|
||||||
goto add;
|
goto add;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user