https://github.com/torvalds/linux
Revision 6e6d9fa6f95e382bb2d5725dda18b9e811418e79 authored by Michael Holzheu on 28 October 2006, 17:38:47 UTC, committed by Linus Torvalds on 28 October 2006, 18:30:54 UTC
strstrip() does not remove the last blank from strings which only consist
of blanks.

Example:
char string[] = "  ";
strstrip(string);

results in " ", but should produce an empty string!

The following patch solves this problem:

Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by Joern Engel <joern@wh.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 5fa3839
History
Tip revision: 6e6d9fa6f95e382bb2d5725dda18b9e811418e79 authored by Michael Holzheu on 28 October 2006, 17:38:47 UTC
[PATCH] strstrip remove last blank fix
Tip revision: 6e6d9fa
File Mode Size
Kconfig -rw-r--r-- 1.7 KB
Kconfig.iosched -rw-r--r-- 1.9 KB
Makefile -rw-r--r-- 347 bytes
as-iosched.c -rw-r--r-- 37.9 KB
blktrace.c -rw-r--r-- 11.9 KB
cfq-iosched.c -rw-r--r-- 51.1 KB
deadline-iosched.c -rw-r--r-- 11.6 KB
elevator.c -rw-r--r-- 24.4 KB
genhd.c -rw-r--r-- 16.7 KB
ioctl.c -rw-r--r-- 7.4 KB
ll_rw_blk.c -rw-r--r-- 99.2 KB
noop-iosched.c -rw-r--r-- 2.6 KB
scsi_ioctl.c -rw-r--r-- 16.4 KB

back to top