OpenAFS CVS Commit: openafs/src/libadmin/test by jaltman
cvs@GRAND.CENTRAL.ORG
cvs@GRAND.CENTRAL.ORG
Sat, 29 Nov 2003 16:38:02 EST
Update of /cvs/openafs/src/libadmin/test
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-tree/src/libadmin/test
Modified Files:
bos.c kas.c
Log Message:
DELTA jbeuhler-flexelint-fun-with-printf-20031128
AUTHOR jaltman@grand.central.org
This patch addresses a number of problems with printf-like functions.
Most of them are %x formats applied to pointers (which could be a
problem depending on the architecture I would assume). There is a
%p format for pointers on many machines but I don't know if it
applies to all supported OpenAFS platforms so I didn't go that route.
There is a buffer overflow fix to ktime.c
There are a couple places where incorrect format characters were used.
One call had two arguments swapped.
Other fixes include the use of PrintInode() and %s formats for
printing inode numbers. The code was inconsistent in this regard -- sometimes
PrintInode() was used, sometimes it was side-stepped.
There is one place where a local shadowed another variable, so I renamed
the local.
The last segment points out that an fdset need not be anything printable
with an integer format.
--
Joe Buehler
Comments - The fdset comment relates to a WinSock only file on which
the size is a pointer to int. Modified the source to use a %p instead
of %x as it is supported on Windows.
Added an assert(p != NULL) to src/rx/rx_packet.c
--- DELTA config follows ---
jbeuhler-flexelint-fun-with-printf-20031128 openafs/src/libadmin/test/bos.c 1.8 1.9
jbeuhler-flexelint-fun-with-printf-20031128 openafs/src/libadmin/test/kas.c 1.6 1.7