[PATCH v1 5/6] lib: scanf: mark sscanf and vsscanf as __must_check
From: Konstantin Khlebnikov
Date: Sun Mar 10 2019 - 12:56:54 EST
Caller must check returned count of matched arguments.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
---
include/linux/kernel.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 32726b25eaa5..3142a456f00b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -483,9 +483,9 @@ const char *kvasprintf_const(gfp_t gfp, const char *fmt, va_list args);
#define SCANF_MORE (1 << 30)
extern __scanf(2, 3)
-int sscanf(const char *, const char *, ...);
+int __must_check sscanf(const char *, const char *, ...);
extern __scanf(2, 0)
-int vsscanf(const char *, const char *, va_list);
+int __must_check vsscanf(const char *, const char *, va_list);
extern int get_option(char **str, int *pint);
extern char *get_options(const char *str, int nints, int *ints);