X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstring.c;h=afce96af3afdf7d6a0e1e343b4260c6f24765f74;hb=07b139c8c81b97bbe55c68daf0cbeca8b1c609ca;hp=3a912a4e9a632a3cf63d1da2f4da6dd502e82ff5;hpb=f653398c86a1c104f0992bd788dd4bb065449be4;p=safe%2Fjmp%2Flinux-2.6 diff --git a/lib/string.c b/lib/string.c index 3a912a4..afce96a 100644 --- a/lib/string.c +++ b/lib/string.c @@ -352,20 +352,20 @@ char *skip_spaces(const char *str) EXPORT_SYMBOL(skip_spaces); /** - * strstrip - Removes leading and trailing whitespace from @s. + * strim - Removes leading and trailing whitespace from @s. * @s: The string to be stripped. * * Note that the first trailing whitespace is replaced with a %NUL-terminator * in the given string @s. Returns a pointer to the first non-whitespace * character in @s. */ -char *strstrip(char *s) +char *strim(char *s) { size_t size; char *end; + s = skip_spaces(s); size = strlen(s); - if (!size) return s; @@ -374,9 +374,9 @@ char *strstrip(char *s) end--; *(end + 1) = '\0'; - return skip_spaces(s); + return s; } -EXPORT_SYMBOL(strstrip); +EXPORT_SYMBOL(strim); #ifndef __HAVE_ARCH_STRLEN /**