Mercurial > hg > dhcpcd
changeset 2172:bb54bdee6a5d draft
Trim whitespace between command and argument
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 29 Nov 2013 17:09:37 +0000 |
| parents | 8a1a9d940b2c |
| children | 919529f8f6bb |
| files | if-options.c |
| diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/if-options.c Fri Nov 29 12:48:52 2013 +0000 +++ b/if-options.c Fri Nov 29 17:09:37 2013 +0000 @@ -1244,7 +1244,7 @@ } /* type */ fp = strwhite(arg); - if (fp) + if (fp) *fp++ = '\0'; t = 0; if (strcasecmp(arg, "request") == 0) { @@ -1498,6 +1498,8 @@ memcpy(line, *e, ol); #endif option = strsep(&line, " \t"); + if (line) + line = strskipwhite(line); /* Trim trailing whitespace */ if (line && *line) { p = line + strlen(line) - 1; @@ -1549,6 +1551,8 @@ while ((line = get_line(f))) { option = strsep(&line, " \t"); + if (line) + line = strskipwhite(line); /* Trim trailing whitespace */ if (line && *line) { p = line + strlen(line) - 1;
