On Friday 13 July 2007, Randy Dunlap wrote: > This patch for UCLINUX: > http://ltp.cvs.sourceforge.net/ltp/ltp/testcases/kernel/syscalls/gethostid/ >gethostid01.c?r1=1.16&r2=1.17 > > doesn't make sense since the following line unconditionally writes > to the same memory area: > > #ifdef UCLINUX > sprintf(hostid, "%lx", TEST_RETURN); > #else > sprintf(hostid, "%0.8lx", TEST_RETURN); > #endif > sprintf(hostid, "%0.8lx", TEST_RETURN); > > It looks like the 2006-07-27 patch from Jane Lv had this correct, > with the third sprintf() line not there at all.
i'm highly skeptical that the UCLINUX define is even correct ... ive backed it out so there is just one sprintf() now > Also, gcc is complaining about the leading 0. when used with > %x (hex) output format... > > gethostid01.c: In function 'main': > gethostid01.c:189: warning: '0' flag ignored with precision and '%x' printf > format gethostid01.c:191: warning: '0' flag ignored with precision and '%x' > printf format also fixed by using %08lx, thanks for the heads up -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
