From: Hoang-Nam Nguyen Date: Sat, 23 Feb 2008 23:23:37 +0000 (-0800) Subject: lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param) X-Git-Tag: v2.6.25-rc3~51 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f9d5f4a353440f2265781bfa641587964901861;p=linux-2.6 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 Cc: Yi Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/vsprintf.c b/lib/vsprintf.c index fd987b17bd..6021757a44 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -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); \