diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-12 00:32:05 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-04-12 00:32:05 +0000 |
commit | e91ac05530803390f7aa5ca646d90ae26c48aa52 (patch) | |
tree | 7a912fc65ff43bdb09078d75bfc02ad8f5380b47 /libbb/trim.c | |
parent | 13adb67bb086c45d7191966ca5fa3bff1de2dd74 (diff) | |
download | busybox-w32-e91ac05530803390f7aa5ca646d90ae26c48aa52.tar.gz busybox-w32-e91ac05530803390f7aa5ca646d90ae26c48aa52.tar.bz2 busybox-w32-e91ac05530803390f7aa5ca646d90ae26c48aa52.zip |
style fixes. No code changes
git-svn-id: svn://busybox.net/trunk/busybox@18409 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb/trim.c')
-rw-r--r-- | libbb/trim.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libbb/trim.c b/libbb/trim.c index d36391540..4957d7276 100644 --- a/libbb/trim.c +++ b/libbb/trim.c | |||
@@ -8,12 +8,8 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <stdio.h> | ||
12 | #include <string.h> | ||
13 | #include <ctype.h> | ||
14 | #include "libbb.h" | 11 | #include "libbb.h" |
15 | 12 | ||
16 | |||
17 | void trim(char *s) | 13 | void trim(char *s) |
18 | { | 14 | { |
19 | size_t len = strlen(s); | 15 | size_t len = strlen(s); |
@@ -23,9 +19,9 @@ void trim(char *s) | |||
23 | while (len && isspace(s[len-1])) --len; | 19 | while (len && isspace(s[len-1])) --len; |
24 | 20 | ||
25 | /* trim leading whitespace */ | 21 | /* trim leading whitespace */ |
26 | if(len) { | 22 | if (len) { |
27 | lws = strspn(s, " \n\r\t\v"); | 23 | lws = strspn(s, " \n\r\t\v"); |
28 | memmove(s, s + lws, len -= lws); | 24 | memmove(s, s + lws, len -= lws); |
29 | } | 25 | } |
30 | s[len] = 0; | 26 | s[len] = '\0'; |
31 | } | 27 | } |