diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2010-10-26 17:22:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:13 -0400 |
commit | a55621f15bc61826969a29e111ba131a55ef45de (patch) | |
tree | 902f9be35bdae39e835ae5c7eb3f79f23d274396 /include/linux/kernel.h | |
parent | c925cf0b80cb486b31e1ec0e9f981d75a4b38453 (diff) |
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>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8e786a27cfe6..e9b492b33032 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -203,10 +203,10 @@ extern unsigned long simple_strtoul(const char *,char **,unsigned int); | |||
203 | extern long simple_strtol(const char *,char **,unsigned int); | 203 | extern long simple_strtol(const char *,char **,unsigned int); |
204 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); | 204 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); |
205 | extern long long simple_strtoll(const char *,char **,unsigned int); | 205 | extern long long simple_strtoll(const char *,char **,unsigned int); |
206 | extern int strict_strtoul(const char *, unsigned int, unsigned long *); | 206 | extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *); |
207 | extern int strict_strtol(const char *, unsigned int, long *); | 207 | extern int __must_check strict_strtol(const char *, unsigned int, long *); |
208 | extern int strict_strtoull(const char *, unsigned int, unsigned long long *); | 208 | extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *); |
209 | extern int strict_strtoll(const char *, unsigned int, long long *); | 209 | extern int __must_check strict_strtoll(const char *, unsigned int, long long *); |
210 | extern int sprintf(char * buf, const char * fmt, ...) | 210 | extern int sprintf(char * buf, const char * fmt, ...) |
211 | __attribute__ ((format (printf, 2, 3))); | 211 | __attribute__ ((format (printf, 2, 3))); |
212 | extern int vsprintf(char *buf, const char *, va_list) | 212 | extern int vsprintf(char *buf, const char *, va_list) |