On Mon, 2014-12-08 at 21:20 -0500, John de la Garza wrote:
> I'm looking at samples/kobject/kobject-example.c
> 
> at line 39 foo is read:
> 
>         sscanf(buf, "%du", &foo);
> 
> foo is an int so why is it read using %du not %d?

My reading of lib/vsprintf.c:vsscanf() is that a "%du" format expects
"buf" to contain an integer followed by a literal 'u' char. Is that your
reading too?


Paul Bolle


_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to