summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-01-15 19:12:32 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-01-15 19:12:32 +0000
commit28141130ed36e17e9b638701d029858005796b96 (patch)
treede7f16d05206f2fed67571cc1cdae96d2f7d7811 /usr.bin
parent9fe91096e3835865ecf604c4a029312a963f2cd8 (diff)
Fix printf format strings. ok millert@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/oldrdist/lookup.c6
-rw-r--r--usr.bin/oldrdist/server.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/oldrdist/lookup.c b/usr.bin/oldrdist/lookup.c
index 536948d55ae..55db4f0000d 100644
--- a/usr.bin/oldrdist/lookup.c
+++ b/usr.bin/oldrdist/lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lookup.c,v 1.8 2003/06/03 02:56:14 millert Exp $ */
+/* $OpenBSD: lookup.c,v 1.9 2004/01/15 19:12:31 otto Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)lookup.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: lookup.c,v 1.8 2003/06/03 02:56:14 millert Exp $";
+static char *rcsid = "$OpenBSD: lookup.c,v 1.9 2004/01/15 19:12:31 otto Exp $";
#endif /* not lint */
#include "defs.h"
@@ -128,7 +128,7 @@ lookup(name, action, value)
char buf[BUFSIZ];
if (debug)
- printf("lookup(%s, %d, %x)\n", name, action, value);
+ printf("lookup(%s, %d, %p)\n", name, action, value);
n = 0;
for (cp = name; *cp; )
diff --git a/usr.bin/oldrdist/server.c b/usr.bin/oldrdist/server.c
index e1854d1929e..4403851f476 100644
--- a/usr.bin/oldrdist/server.c
+++ b/usr.bin/oldrdist/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.24 2003/06/03 02:56:14 millert Exp $ */
+/* $OpenBSD: server.c,v 1.25 2004/01/15 19:12:31 otto Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: server.c,v 1.24 2003/06/03 02:56:14 millert Exp $";
+static char *rcsid = "$OpenBSD: server.c,v 1.25 2004/01/15 19:12:31 otto Exp $";
#endif /* not lint */
#include <sys/wait.h>
@@ -391,14 +391,14 @@ sendf(rname, opts)
log(lfp, "%s: no password entry for uid %u \n",
target, stb.st_uid);
pw = NULL;
- (void) snprintf(user, sizeof(user), ":%lu", stb.st_uid);
+ (void) snprintf(user, sizeof(user), ":%u", stb.st_uid);
}
if (gr == NULL || gr->gr_gid != stb.st_gid)
if ((gr = getgrgid(stb.st_gid)) == NULL) {
log(lfp, "%s: no name for group %u\n",
target, stb.st_gid);
gr = NULL;
- (void) snprintf(group, sizeof(group), ":%lu",
+ (void) snprintf(group, sizeof(group), ":%u",
stb.st_gid);
}
if (u == 1) {
@@ -468,8 +468,8 @@ sendf(rname, opts)
}
}
(void) snprintf(buf, sizeof(buf), "K%o %o %qd %ld %s %s %s\n",
- opts, stb.st_mode & 07777, stb.st_size, stb.st_mtime,
- protoname(), protogroup(), rname);
+ opts, stb.st_mode & 07777, stb.st_size,
+ (long)stb.st_mtime, protoname(), protogroup(), rname);
if (debug)
printf("buf = %s", buf);
(void) write(rem, buf, strlen(buf));
@@ -511,7 +511,7 @@ sendf(rname, opts)
return;
}
(void) snprintf(buf, sizeof(buf), "R%o %o %qd %ld %s %s %s\n", opts,
- stb.st_mode & 07777, stb.st_size, stb.st_mtime,
+ stb.st_mode & 07777, stb.st_size, (long)stb.st_mtime,
protoname(), protogroup(), rname);
if (debug)
printf("buf = %s", buf);
@@ -604,7 +604,7 @@ update(rname, opts, stp)
time_t mtime;
if (debug)
- printf("update(%s, %x, %x)\n", rname, opts, stp);
+ printf("update(%s, %x, %p)\n", rname, opts, stp);
/*
* Check to see if the file exists on the remote machine.
@@ -715,7 +715,7 @@ query(name)
switch (stb.st_mode & S_IFMT) {
case S_IFREG:
(void) snprintf(buf, sizeof(buf), "Y%qd %ld\n", stb.st_size,
- stb.st_mtime);
+ (long)stb.st_mtime);
(void) write(rem, buf, strlen(buf));
break;