mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.6.25] lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)
@ 2008-02-21 15:29 Hoang-Nam Nguyen
  0 siblings, 0 replies; only message in thread
From: Hoang-Nam Nguyen @ 2008-02-21 15:29 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: raisch

lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)

This exists in 2.6.25 only.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
---
 lib/vsprintf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index fd987b1..6021757 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);		\
-- 
1.5.2



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-21 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-21 15:29 [PATCH 2.6.25] lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param) Hoang-Nam Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome