aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorAndrĂ© Goddard Rosa <[email protected]>2009-12-15 02:01:04 +0000
committerLinus Torvalds <[email protected]>2009-12-15 16:53:32 +0000
commitf653398c86a1c104f0992bd788dd4bb065449be4 (patch)
tree69cd79aaca48c2e1bdf9a48b968772347dbd5df2 /lib/dynamic_debug.c
parentdrivers/scsi/sym53c8xx_2/sym_glue.c: rename skip_spaces() to sym_skip_spaces() (diff)
downloadkernel-f653398c86a1c104f0992bd788dd4bb065449be4.tar.gz
kernel-f653398c86a1c104f0992bd788dd4bb065449be4.zip
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions