mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param) Signed-off-by: Hoang-Nam Nguyen <[email protected]> Cc: Yi Yang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
8ca3ed87db
commit
4f9d5f4a35
1 file changed
+1
-1
+1
-1
@@ -234,7 +234,7 @@ int strict_strto##type(const char *cp, unsigned int base, valtype *res) \
|
||||
int ret; \
|
||||
if (*cp == '-') { \
|
||||
ret = strict_strtou##type(cp+1, base, res); \
|
||||
if (ret != 0) \
|
||||
if (!ret) \
|
||||
*res = -(*res); \
|
||||
} else \
|
||||
ret = strict_strtou##type(cp, base, res); \
|
||||
|
||||
Reference in new issue
Block a user