mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 07:31:45 +00:00
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c925cf0b80
commit
a55621f15b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user