Commit a55621f1 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

include/linux/kernel.h: add __must_check to strict_strto*()

The whole point to using the strict functions is to check the return
value.  If you don't, strict_strto*() will return you uninitialised
garbage.  Offenders have been observed in the wild.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c925cf0b
......@@ -203,10 +203,10 @@ extern unsigned long simple_strtoul(const char *,char **,unsigned int);
extern long simple_strtol(const char *,char **,unsigned int);
extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
extern long long simple_strtoll(const char *,char **,unsigned int);
extern int strict_strtoul(const char *, unsigned int, unsigned long *);
extern int strict_strtol(const char *, unsigned int, long *);
extern int strict_strtoull(const char *, unsigned int, unsigned long long *);
extern int strict_strtoll(const char *, unsigned int, long long *);
extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *);
extern int __must_check strict_strtol(const char *, unsigned int, long *);
extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *);
extern int __must_check strict_strtoll(const char *, unsigned int, long long *);
extern int sprintf(char * buf, const char * fmt, ...)
__attribute__ ((format (printf, 2, 3)));
extern int vsprintf(char *buf, const char *, va_list)
......
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