Commit 0a1b71b4 authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Linus Torvalds

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: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 478988d3
...@@ -62,7 +62,7 @@ extern char * strnchr(const char *, size_t, int); ...@@ -62,7 +62,7 @@ extern char * strnchr(const char *, size_t, int);
#ifndef __HAVE_ARCH_STRRCHR #ifndef __HAVE_ARCH_STRRCHR
extern char * strrchr(const char *,int); extern char * strrchr(const char *,int);
#endif #endif
extern char * strstrip(char *); extern char * __must_check strstrip(char *);
#ifndef __HAVE_ARCH_STRSTR #ifndef __HAVE_ARCH_STRSTR
extern char * strstr(const char *,const char *); extern char * strstr(const char *,const char *);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment