mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-28 06:10:35 +00:00
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>
This commit is contained in:
parent
478988d3b2
commit
0a1b71b400
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user