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.
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
---
~Randy
-------------------------------------------------------------------------
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