lkml.org 
[lkml]   [2009]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix %*s%n in sscanf
> >   int end;
> > char buf[] = "hello world";
> > sscanf(buf, "%*s%n", &end);
> > printf("%d\n", end);
>
> Yeah, seems reasonable. So, without your patch, sscanf() in kernel
> will ignore everything after '*', right?

Currently it ignores everything between '*' and whitespace. So '%*s%n'
does not work, but '%*s %n' will correctly return the start of "world".
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-09-25 12:45    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site