aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2010-10-26 17:22:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 19:52:13 -0400
commita55621f15bc61826969a29e111ba131a55ef45de (patch)
tree902f9be35bdae39e835ae5c7eb3f79f23d274396 /include/linux/kernel.h
parentc925cf0b80cb486b31e1ec0e9f981d75a4b38453 (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.h8
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);
203extern long simple_strtol(const char *,char **,unsigned int); 203extern long simple_strtol(const char *,char **,unsigned int);
204extern unsigned long long simple_strtoull(const char *,char **,unsigned int); 204extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
205extern long long simple_strtoll(const char *,char **,unsigned int); 205extern long long simple_strtoll(const char *,char **,unsigned int);
206extern int strict_strtoul(const char *, unsigned int, unsigned long *); 206extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *);
207extern int strict_strtol(const char *, unsigned int, long *); 207extern int __must_check strict_strtol(const char *, unsigned int, long *);
208extern int strict_strtoull(const char *, unsigned int, unsigned long long *); 208extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *);
209extern int strict_strtoll(const char *, unsigned int, long long *); 209extern int __must_check strict_strtoll(const char *, unsigned int, long long *);
210extern int sprintf(char * buf, const char * fmt, ...) 210extern int sprintf(char * buf, const char * fmt, ...)
211 __attribute__ ((format (printf, 2, 3))); 211 __attribute__ ((format (printf, 2, 3)));
212extern int vsprintf(char *buf, const char *, va_list) 212extern int vsprintf(char *buf, const char *, va_list)