diff options
author | Denis Vlasenko | 2006-10-25 12:46:03 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-25 12:46:03 +0000 |
commit | d18a3a20dbafc4023b1c636b4e9b4bb80902c1e8 (patch) | |
tree | 5f3775e14e05880c7977402384756e6ca3102096 /modutils | |
parent | c8400a216206a848f6c4b83b668df37f6fb546ee (diff) | |
download | busybox-d18a3a20dbafc4023b1c636b4e9b4bb80902c1e8.zip busybox-d18a3a20dbafc4023b1c636b4e9b4bb80902c1e8.tar.gz |
use skip_whitespace where appropriate
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/modprobe.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index ba24791..5d62ae5 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -76,15 +76,13 @@ static int parse_tag_value ( char *buffer, char **ptag, char **pvalue ) { char *tag, *value; - while ( isspace ( *buffer )) - buffer++; + buffer = skip_whitespace ( buffer ); tag = value = buffer; while ( !isspace ( *value )) if (!*value) return 0; else value++; *value++ = 0; - while ( isspace ( *value )) - value++; + value = skip_whitespace ( value ); if (!*value) return 0; *ptag = tag; @@ -311,11 +309,9 @@ static void include_conf ( struct dep_t **first, struct dep_t **current, char *b } } else if (( strncmp ( buffer, "include", 7 ) == 0 ) && isspace ( buffer [7] )) { + int fdi; char *filename; - int fdi; char *filename = buffer + 8; - - while ( isspace ( *filename )) - filename++; + filename = skip_whitespace ( buffer + 8 ); if (( fdi = open ( filename, O_RDONLY )) >= 0 ) { include_conf(first, current, buffer, buflen, fdi); |