diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2007-11-06 10:22:30 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2007-11-06 10:22:30 +0000 |
commit | ffa0ca8c090934f01ce0b62dbd1d818745a739aa (patch) | |
tree | d3605227e20cc1c217e4e7cbb65744fae463aa7b /bin | |
parent | a14390fe9e9ae5805f69dc9a0d6c2455744d8234 (diff) |
fix format string
ok ray@ gilles@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ed/io.c | 8 | ||||
-rw-r--r-- | bin/ps/print.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/bin/ed/io.c b/bin/ed/io.c index fd9215c2885..25c43d37374 100644 --- a/bin/ed/io.c +++ b/bin/ed/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.11 2003/06/11 23:42:12 deraadt Exp $ */ +/* $OpenBSD: io.c,v 1.12 2007/11/06 10:22:29 chl Exp $ */ /* $NetBSD: io.c,v 1.2 1995/03/21 09:04:43 cgd Exp $ */ /* io.c: This file contains the i/o routines for the ed line editor */ @@ -32,7 +32,7 @@ #if 0 static char *rcsid = "@(#)io.c,v 1.1 1994/02/01 00:34:41 alm Exp"; #else -static char rcsid[] = "$OpenBSD: io.c,v 1.11 2003/06/11 23:42:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.12 2007/11/06 10:22:29 chl Exp $"; #endif #endif /* not lint */ @@ -61,7 +61,7 @@ read_file(char *fn, int n) seterrmsg("cannot close input file"); return ERR; } - fprintf(stderr, !scripted ? "%lu\n" : "", size); + fprintf(stderr, !scripted ? "%d\n" : "", size); return current_addr - n; } @@ -169,7 +169,7 @@ write_file(char *fn, char *mode, int n, int m) seterrmsg("cannot close output file"); return ERR; } - fprintf(stderr, !scripted ? "%lu\n" : "", size); + fprintf(stderr, !scripted ? "%d\n" : "", size); return n ? m - n + 1 : 0; } diff --git a/bin/ps/print.c b/bin/ps/print.c index 428ec7807fc..05e09a3e72f 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.42 2006/11/29 12:34:19 miod Exp $ */ +/* $OpenBSD: print.c,v 1.43 2007/11/06 10:22:29 chl Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.42 2006/11/29 12:34:19 miod Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.43 2007/11/06 10:22:29 chl Exp $"; #endif #endif /* not lint */ @@ -269,7 +269,7 @@ state(const struct kinfo_proc2 *kp, VARENT *ve) if (state == 'R' && ncpu && kp->p_cpuid != KI_NOCPU) { char pbuf[16]; - snprintf(pbuf, sizeof pbuf, "/%d", kp->p_cpuid); + snprintf(pbuf, sizeof pbuf, "/%llu", kp->p_cpuid); *++cp = '\0'; strlcat(buf, pbuf, sizeof buf); cp = buf + strlen(buf); |