lkml.org 
[lkml]   [2002]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Re: sscanf("-1", "%d", &i) fails, returns 0
From
Date
(Sorry for taking so long to review something so short, btw.)

On Tue, 2002-11-12 at 23:06, Randy.Dunlap wrote:
> On 11 Nov 2002, Ray Lee wrote:
> | Explicitly, in the scan conversion you'd do a:
> | unsigned int *u = (unsigned int *) va_arg(args,long long *);
> | *u = (unsigned int) converted_value;

(Luckily you didn't follow my code snippet too closely. Oops.)

> See if this is close...
<snip>
> I think that this patch (to 2.5.47) gets the kernel close
> to the same semantics as C's sscanf() function, which is
> usually a good thing. What say you?

The sample conversions and patch look correct. Time to forward it
onward, me thinks.

Ray

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.031 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site