diff options
author | Bruce Evans <bde@FreeBSD.org> | 1998-07-06 20:28:08 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1998-07-06 20:28:08 +0000 |
commit | 78cda23056d827fd9466deeb99a2085ea8054788 (patch) | |
tree | 0ca85a4c0a7c7382d8598a22bffd9a4410392005 | |
parent | 6497a56c81fa4c40d726398a4ce5cbaff300594c (diff) | |
download | src-78cda23056d827fd9466deeb99a2085ea8054788.tar.gz src-78cda23056d827fd9466deeb99a2085ea8054788.zip |
Fixed printf format errors.
Notes
Notes:
svn path=/head/; revision=37450
-rw-r--r-- | usr.sbin/cron/cron/cron.c | 4 | ||||
-rw-r--r-- | usr.sbin/pstat/pstat.c | 16 | ||||
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/cron/cron/cron.c b/usr.sbin/cron/cron/cron.c index 0b997ca9579b..2389c9b66f9e 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 d5a26a6182cf..f24a11f6f13f 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 5c4636afef9d..15db188fc904 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, |