Use %zu for size_t, not %zd.

Submitted by:	ru
MFC after:	1 week
This commit is contained in:
Ed Maste 2009-09-23 15:32:59 +00:00
parent c39f46352f
commit 7149ebf446
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197437

View File

@ -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);