summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-06 20:28:08 +0000
committerbde <bde@FreeBSD.org>1998-07-06 20:28:08 +0000
commita5b3c3ea4ff41b0410eadd2544a171100a5ac2e8 (patch)
tree9a61c023a5355a350c9bf27918e191800afb7d08 /usr.sbin
parent930e39f58373da9dd505b13eb5abddc77f6591d6 (diff)
downloadFreeBSD-src-a5b3c3ea4ff41b0410eadd2544a171100a5ac2e8.zip
FreeBSD-src-a5b3c3ea4ff41b0410eadd2544a171100a5ac2e8.tar.gz
Fixed printf format errors.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/cron/cron/cron.c4
-rw-r--r--usr.sbin/pstat/pstat.c16
-rw-r--r--usr.sbin/syslogd/syslogd.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/cron/cron/cron.c b/usr.sbin/cron/cron/cron.c
index 0b997ca..2389c9b 100644
--- a/usr.sbin/cron/cron/cron.c
+++ b/usr.sbin/cron/cron/cron.c
@@ -17,7 +17,7 @@
#if !defined(lint) && !defined(LINT)
static const char rcsid[] =
- "$Id: cron.c,v 1.5 1997/03/31 05:09:54 imp Exp $";
+ "$Id: cron.c,v 1.6 1997/09/15 06:39:04 charnier Exp $";
#endif
#define MAIN_PROGRAM
@@ -232,7 +232,7 @@ cron_sleep() {
do {
seconds_to_wait = (int) (TargetTime - time((time_t*)0));
Debug(DSCH, ("[%d] TargetTime=%ld, sec-to-wait=%d\n",
- getpid(), TargetTime, seconds_to_wait))
+ getpid(), (long)TargetTime, seconds_to_wait))
/* if we intend to sleep, this means that it's finally
* time to empty the job queue (execute it).
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index d5a26a6..f24a11f 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
#endif
static const char rcsid[] =
- "$Id: pstat.c,v 1.34 1998/01/06 05:33:28 dyson Exp $";
+ "$Id: pstat.c,v 1.35 1998/03/07 15:36:27 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -476,8 +476,8 @@ vnode_print(avnode, vp)
if (flag == 0)
*fp++ = '-';
*fp = '\0';
- (void)printf("%8x %s %5s %4d %4d",
- avnode, type, flags, vp->v_usecount, vp->v_holdcnt);
+ (void)printf("%p %s %5s %4d %4d",
+ (void *)avnode, type, flags, vp->v_usecount, vp->v_holdcnt);
}
void
@@ -566,7 +566,7 @@ nfs_print(vp)
*flags = '\0';
#define VT np->n_vattr
- (void)printf(" %6d %5s", VT.va_fileid, flagbuf);
+ (void)printf(" %6ld %5s", VT.va_fileid, flagbuf);
type = VT.va_mode & S_IFMT;
if (S_ISCHR(VT.va_mode) || S_ISBLK(VT.va_mode))
if (usenumflag || ((name = devname(VT.va_rdev, type)) == NULL))
@@ -593,7 +593,7 @@ union_print(vp)
KGETRET(VTOUNION(vp), &unode, sizeof(unode), "vnode's unode");
- (void)printf(" %8x %8x", up->un_uppervp, up->un_lowervp);
+ (void)printf(" %p %p", (void *)up->un_uppervp, (void *)up->un_lowervp);
return (0);
}
@@ -904,7 +904,7 @@ ttyprt(tp, line)
if (j == 0)
state[j++] = '-';
state[j] = '\0';
- (void)printf("%-6s %8x", state, (u_long)tp->t_session);
+ (void)printf("%-6s %p", state, (void *)tp->t_session);
pgid = 0;
if (tp->t_pgrp != NULL)
KGET2(&tp->t_pgrp->pg_id, &pgid, sizeof(pid_t), "pgid");
@@ -962,7 +962,7 @@ filemode()
for (; (char *)fp < buf + len; addr = fp->f_list.le_next, fp++) {
if ((unsigned)fp->f_type > DTYPE_SOCKET)
continue;
- (void)printf("%x ", addr);
+ (void)printf("%p ", (void *)addr);
(void)printf("%-8.8s", dtypes[fp->f_type]);
fbp = flagbuf;
if (fp->f_flag & FREAD)
@@ -982,7 +982,7 @@ filemode()
*fbp = '\0';
(void)printf("%6s %3d", flagbuf, fp->f_count);
(void)printf(" %3d", fp->f_msgcount);
- (void)printf(" %8.1x", fp->f_data);
+ (void)printf(" %8p", (void *)fp->f_data);
if (fp->f_offset < 0)
(void)printf(" %qx\n", fp->f_offset);
else
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 5c4636a..15db188 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#endif
static const char rcsid[] =
- "$Id: syslogd.c,v 1.36 1998/06/27 21:45:59 steve Exp $";
+ "$Id: syslogd.c,v 1.37 1998/07/02 19:35:40 guido Exp $";
#endif /* not lint */
/*
@@ -701,7 +701,7 @@ logmsg(pri, msg, from, flags)
(void)strncpy(f->f_lasttime, timestamp, 15);
f->f_prevcount++;
dprintf("msg repeated %d times, %ld sec of %d\n",
- f->f_prevcount, now - f->f_time,
+ f->f_prevcount, (long)(now - f->f_time),
repeatinterval[f->f_repeatcount]);
/*
* If domark would have logged this by now,
OpenPOWER on IntegriCloud