OpenAFS CVS Commit: openafs/src/volser by jaltman

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Sat, 29 Nov 2003 16:38:07 EST


Update of /cvs/openafs/src/volser
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-tree/src/volser

Modified Files:
	vsprocs.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/volser/vsprocs.c 1.26 1.27