lkml.org 
[lkml]   [2008]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2.6.25] lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)
Date
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



\
 
 \ /
  Last update: 2008-02-21 16:39    [W:0.037 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site