Fix a couple of size_t warnings
authorAndrew Deason <adeason@sinenomine.net>
Mon, 19 Oct 2009 01:46:27 +0000 (20:46 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 19 Oct 2009 12:33:27 +0000 (05:33 -0700)
fsprobe/fsprobe.c and kauth/ka-forwarder.c were trying to print size_t's
without using AFS_SIZET_FMT. Fix that.

Reviewed-on: http://gerrit.openafs.org/678
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/fsprobe/fsprobe.c
src/kauth/ka-forwarder.c

index 2272f38..34ec2c1 100644 (file)
@@ -550,7 +550,7 @@ fsprobe_Init(int a_numServers, struct sockaddr_in *a_socketArray,
        malloc(a_numServers * sizeof(struct fsprobe_ConnectionInfo));
     if (fsprobe_ConnInfo == (struct fsprobe_ConnectionInfo *)0) {
        fprintf(stderr,
-               "[%s] Can't allocate %d connection info structs (%lu bytes)\n",
+               "[%s] Can't allocate %d connection info structs (%"AFS_SIZET_FMT" bytes)\n",
                rn, a_numServers,
                (a_numServers * sizeof(struct fsprobe_ConnectionInfo)));
        return (-1);            /*No cleanup needs to be done yet */
index f894353..091e7c6 100644 (file)
  * running on an MIT kerberos server.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
+#include <afs/stds.h>
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
@@ -249,7 +254,7 @@ main(int argc, char **argv)
            strcpy(a1, inet_ntoa(from.sin_addr));
            strcpy(a2, inet_ntoa(to->sin_addr));
 
-           syslog(LOG_INFO, "forwarding %d bytes from %s/%d to %s/%d\n",
+           syslog(LOG_INFO, "forwarding %"AFS_SIZET_FMT" bytes from %s/%d to %s/%d\n",
                   sendlen, a1, htons(from.sin_port), a2, htons(to->sin_port));
        }