aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-10-26 19:49:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-29 10:39:25 -0400
commit0a1b71b4008d332e57b5605a8228ea7aa96687e8 (patch)
tree92016012d1fa61980b5fd1519172704364f51e2d
parent478988d3b28e98a31e0cfe24e011e28ba0f3cf0d (diff)
strstrip(): mark as as must_check
strstrip() can return a modified value of its input argument, when removing elading whitesapce. So it is surely bug for this function's return value to be ignored. The caller is probably going to use the incorrect original pointer. So mark it __must_check to prevent this frm happening (as it has before). Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 489019ef1694..b8508868d5ad 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -62,7 +62,7 @@ extern char * strnchr(const char *, size_t, int);
62#ifndef __HAVE_ARCH_STRRCHR 62#ifndef __HAVE_ARCH_STRRCHR
63extern char * strrchr(const char *,int); 63extern char * strrchr(const char *,int);
64#endif 64#endif
65extern char * strstrip(char *); 65extern char * __must_check strstrip(char *);
66#ifndef __HAVE_ARCH_STRSTR 66#ifndef __HAVE_ARCH_STRSTR
67extern char * strstr(const char *,const char *); 67extern char * strstr(const char *,const char *);
68#endif 68#endif