From 82a44c46c6c4837db46382bd0981bebbb5b2cd83 Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 23 Sep 2009 15:32:59 +0000 Subject: Use %zu for size_t, not %zd. Submitted by: ru MFC after: 1 week --- usr.bin/gcore/elfcore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/gcore') diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index a5acaf1..6c90708 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, pid_t pid) err(1, "read from %s", memname); if ((size_t)ngot < nwant) errx(1, "short read from %s:" - " wanted %zd, got %zd", memname, + " wanted %zu, got %zd", memname, nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) @@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *status, prfpregset_t *fpregset, if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(status->pr_reg)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof status->pr_reg, n); close(fd); @@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *status, prfpregset_t *fpregset, if ((n = read(fd, fpregset, sizeof *fpregset)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(*fpregset)) - errx(1, "short read from %s: wanted %zd, got %d", name, + errx(1, "short read from %s: wanted %zu, got %d", name, sizeof *fpregset, n); close(fd); -- cgit v1.1