On Dec 4, 2009, at 5:32 AM, Ashley Pittman wrote:

> > It might be good to safely ignore 0x if it's present, but that's a small 
> > feature enhancement that can be done at any time (I filed a future ticket).
> 
> Maybe not relevant but it bit me so I'll say it here, using "%x" with
> sscanf on a string of "0x1" will match the whole thing and give a value
> of 1 on Linux but on Solaris it'll match the "0" as a hex value of 0 and
> not match the "x1" at all leading to further errors in subsequent
> matches as well.  The most annoying thing is that sscanf() thinks it's
> matched and it's return code will be set accordingly.

Yuck!

Thankfully, we don't appear to be using sscanf() to convert the cpuset strings.

-- 
Jeff Squyres
jsquy...@cisco.com


Reply via email to