From: Andrew Deason Date: Fri, 11 Jun 2010 21:51:02 +0000 (-0500) Subject: vlclient: work with non-space whitespace X-Git-Tag: openafs-devel-1_5_75~159 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=df18c9e895e75e77ed466dea3b06ef2a0a07260a;p=packages%2Fo%2Fopenafs.git vlclient: work with non-space whitespace Make vlclient work with non-space whitespace separating arguments. This also makes it cope with a trailing newline that fgets() gives us, making this more intuitive to use. Change-Id: Ida4da9f997ac073a5afa6c95e1b3cec180c18e1a Reviewed-on: http://gerrit.openafs.org/2126 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear --- diff --git a/src/vlserver/vlclient.c b/src/vlserver/vlclient.c index 3038cc0cb..ef7081871 100644 --- a/src/vlserver/vlclient.c +++ b/src/vlserver/vlclient.c @@ -37,6 +37,7 @@ #endif #include #include +#include #include #include @@ -1316,14 +1317,14 @@ GetArgs(char *line, char **args, int *nargs) *nargs = 0; while (*line) { register char *last = line; - while (*line == ' ') + while (isspace(*line)) line++; - if (*last == ' ') + if (isspace(*last)) *last = 0; if (!*line) break; *args++ = line, (*nargs)++; - while (*line && *line != ' ') + while (*line && !isspace(*line)) line++; } }