Re: [PATCH] Lib:The patch include fix for "-" during string to long conversion

2012-11-18 Thread George Spelvin
Namit Gupta wrote: > @@ -91,10 +98,18 @@ EXPORT_SYMBOL(simple_strtol); > */ > long long simple_strtoll(const char *cp, char **endp, unsigned int base) > { > > long l; > > if (cp[0] != '-') > return simple_strtoull(cp, endp, base); > l = -simple_strtoull(cp+1, endp, ba

Re: [PATCH] Lib:The patch include fix for "-" during string to long conversion

2012-11-05 Thread Jan Beulich
>>> On 04.11.12 at 14:26, Namit Gupta wrote: > API simple_strtol() and simple_strtoul() are giving incorrect result for > string "-". > These API's consider "-" as a '-' (negative integer) and return incorrect > string pointer. > The API returns pointer next to '-' character. However it should ret

Re: [PATCH] Lib:The patch include fix for "-" during string to long conversion

2012-11-04 Thread George Spelvin
Namit Gupta wrote: > API simple_strtol() and simple_strtoul() are giving incorrect result for > string "-". > These API's consider "-" as a '-' (negative integer) and return incorrect > string pointer. > The API returns pointer next to '-' character. However it should return > starting pointer of