André Goddard Rosa
f653398c86
string: factorize skip_spaces and export it to be generally available
...
On the following sentence:
while (*s && isspace(*s))
s++;
If *s == 0, isspace() evaluates to ((_ctype[*s] & 0x20) != 0), which
evaluates to ((0x08 & 0x20) != 0) which equals to 0 as well.
If *s == 1, we depend on isspace() result anyway. In other words,
"a char equals zero is never a space", so remove this check.
Also, *s != 0 is most common case (non-null string).
Fixed const return as noticed by Jan Engelhardt and James Bottomley.
Fixed unnecessary extra cast on strstrip() as noticed by Jan Engelhardt.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2009-12-15 08:53:32 -08:00
..
2009-12-14 00:26:26 +01:00
2009-12-09 19:52:01 -08:00
2009-12-13 19:21:56 +01:00
2009-11-18 22:19:03 -08:00
2009-11-24 08:18:54 +02:00
2009-12-03 13:23:12 -08:00
2009-12-14 12:49:47 +11:00
2009-12-14 10:22:11 -08:00
2009-12-03 15:58:56 -05:00
2009-12-11 15:34:40 -08:00
2009-12-03 18:01:23 -05:00
2009-11-26 09:16:19 +01:00
2009-12-03 09:24:48 +01:00
2009-11-24 15:06:47 +11:00
2009-12-04 23:41:47 +01:00
2009-12-03 19:28:51 +01:00
2009-12-04 15:39:55 +01:00
2009-12-08 19:28:09 -08:00
2009-12-05 15:32:03 -08:00
2009-12-05 15:32:03 -08:00
2009-11-25 17:57:36 +01:00
2009-12-09 17:09:36 +11:00
2009-11-24 13:33:34 -05:00
2009-12-06 21:10:56 +01:00
2009-12-02 22:07:23 -08:00
2009-12-15 08:53:28 -08:00
2009-12-15 08:53:32 -08:00
2009-12-11 11:24:51 -08:00
2009-12-08 19:26:55 -08:00
2009-11-25 17:57:36 +01:00
2009-12-15 08:53:25 -08:00
2009-12-15 08:53:27 -08:00
2009-12-03 13:18:04 -08:00
2009-12-10 15:02:51 +01:00
2009-12-10 15:02:53 +01:00
2009-12-10 09:34:40 -08:00
2009-12-03 12:14:36 -08:00
2009-12-11 11:24:52 -08:00
2009-12-10 15:02:50 +01:00
2009-11-19 18:12:05 +00:00
2009-11-19 18:11:35 +00:00
2009-11-24 17:00:27 +11:00
2009-12-09 13:55:26 -05:00
2009-12-03 11:58:47 +00:00
2009-12-08 20:30:41 -08:00
2009-12-10 13:08:11 +01:00
2009-12-15 08:53:12 -08:00
2009-12-14 10:10:55 -08:00
2009-12-01 14:47:32 +08:00
2009-11-20 00:25:42 +00:00
2009-12-14 21:17:29 +01:00
2009-12-02 21:58:33 -08:00
2009-11-28 15:05:05 -05:00
2009-12-08 20:42:28 -08:00
2009-11-26 15:53:10 -08:00
2009-11-26 16:00:36 -08:00
2009-11-19 11:08:54 -05:00
2009-12-09 19:43:33 -08:00
2009-12-03 12:14:38 -08:00
2009-12-15 08:53:27 -08:00
2009-11-20 00:52:09 -08:00
2009-12-02 23:38:13 -08:00
2009-12-04 16:36:18 +01:00
2009-12-04 15:39:57 +01:00
2009-12-11 15:18:07 -08:00
2009-11-26 12:59:20 +01:00
2009-12-15 08:53:26 -08:00
2009-12-11 15:18:03 -08:00
2009-12-15 08:53:26 -08:00
2009-12-15 08:53:20 -08:00
2009-12-03 09:32:17 +02:00
2009-12-09 17:14:38 +11:00
2009-12-09 19:42:25 -08:00
2009-12-15 08:53:20 -08:00
2009-12-15 08:53:12 -08:00
2009-12-15 08:53:20 -08:00
2009-12-15 08:53:24 -08:00
2009-12-11 11:24:54 -08:00
2009-12-05 15:22:26 -08:00
2009-12-03 15:59:22 -08:00
2009-12-05 16:08:40 -05:00
2009-12-04 15:55:38 -05:00
2009-12-05 16:08:40 -05:00
2009-11-20 10:05:52 +09:00
2009-11-28 15:05:05 -05:00
2009-12-15 08:53:13 -08:00
2009-12-15 08:53:13 -08:00
2009-12-01 16:15:50 -08:00
2009-12-15 08:53:12 -08:00
2009-12-09 12:12:44 +02:00
2009-12-15 08:53:17 -08:00
2009-12-12 14:27:24 -08:00
2009-12-14 10:11:34 -08:00
2009-12-04 15:56:19 -08:00
2009-12-08 10:02:12 +09:00
2009-12-09 09:48:20 +01:00
2009-12-04 15:39:55 +01:00
2009-12-11 11:24:55 -08:00
2009-12-06 16:17:57 +01:00
2009-12-15 08:53:25 -08:00
2009-12-03 11:43:23 +00:00
2009-12-02 09:55:33 +01:00
2009-12-10 15:02:54 +01:00
2009-11-22 18:58:16 +01:00
2009-11-22 18:58:16 +01:00
2009-11-22 18:58:16 +01:00
2009-11-18 17:09:26 -05:00
2009-12-15 08:53:20 -08:00
2009-12-15 08:53:26 -08:00
2009-12-15 08:53:27 -08:00
2009-11-23 15:53:52 -05:00
2009-12-04 15:39:55 +01:00
2009-11-30 12:02:53 +09:00
2009-12-02 19:57:15 -08:00
2009-12-11 09:17:02 +01:00
2009-12-01 08:20:31 -08:00
2009-12-11 09:17:02 +01:00
2009-11-18 14:52:25 +01:00
2009-11-24 14:41:13 +01:00
2009-12-15 08:53:32 -08:00
2009-12-15 08:53:16 -08:00
2009-12-11 06:44:29 -05:00
2009-12-09 19:43:33 -08:00
2009-12-02 22:07:25 -08:00
2009-12-08 19:30:19 -08:00
2009-12-09 14:05:49 -05:00
2009-11-26 09:04:55 +01:00
2009-12-15 08:53:28 -08:00
2009-11-20 00:52:05 -08:00
2009-12-11 11:55:26 -08:00
2009-12-11 11:55:27 -08:00
2009-12-10 22:55:37 +01:00
2009-11-29 22:03:04 +01:00
2009-12-09 19:50:49 -08:00
2009-12-15 08:53:16 -08:00
2009-12-15 08:53:28 -08:00
2009-12-03 13:54:25 +01:00
2009-11-18 23:30:41 -08:00
2009-11-25 15:48:37 -08:00