Use '%zu' and '%zd' as appropriate for size_t / ssize_t.
This commit is contained in:
parent
f4e10b2c3f
commit
7f1a5459c2
@ -80,7 +80,7 @@ test(int domain, const char *domainstr, struct sockaddr *sa, socklen_t salen)
|
||||
|
||||
size = recv(sock_receive, NULL, 0, 0);
|
||||
if (size > 0)
|
||||
errx(-1, "Protocol %s recv(sock_receive, NULL, 0) before: %d",
|
||||
errx(-1, "Protocol %s recv(sock_receive, NULL, 0) before: %zd",
|
||||
domainstr, size);
|
||||
else if (size < 0)
|
||||
err(-1, "Protocol %s recv(sock_receive, NULL, 0) before",
|
||||
@ -98,7 +98,7 @@ test(int domain, const char *domainstr, struct sockaddr *sa, socklen_t salen)
|
||||
|
||||
size = recv(sock_receive, NULL, 0, 0);
|
||||
if (size > 0)
|
||||
errx(-1, "Protocol %s recv(sock_receive, NULL, 0) after: %d",
|
||||
errx(-1, "Protocol %s recv(sock_receive, NULL, 0) after: %zd",
|
||||
domainstr, size);
|
||||
else if (size < 0)
|
||||
err(-1, "Protocol %s recv(sock_receive, NULL, 0) after",
|
||||
|
@ -95,7 +95,7 @@ main(int argc, char *argv[])
|
||||
if (len < 0)
|
||||
err(-1, "sendto()");
|
||||
if (len != sizeof(packet))
|
||||
errx(-1, "sendto(): short send (%d length, %d sent)",
|
||||
errx(-1, "sendto(): short send (%zu length, %zd sent)",
|
||||
sizeof(packet), len);
|
||||
|
||||
sleep(1); /* Arbitrary non-zero amount. */
|
||||
@ -105,7 +105,7 @@ main(int argc, char *argv[])
|
||||
if (len < 0)
|
||||
err(-1, "recv()");
|
||||
if (len != sizeof(packet))
|
||||
errx(-1, "recv(): short receive (%d length, %d received)",
|
||||
errx(-1, "recv(): short receive (%zu length, %zd received)",
|
||||
sizeof(packet), len);
|
||||
|
||||
for (i = 0; i < PACKETLEN; i++) {
|
||||
|
@ -86,7 +86,7 @@ fill_blocks(void)
|
||||
if (len < 0)
|
||||
break;
|
||||
if (len != BLOCKSIZE) {
|
||||
warnx("fill_blocks: write(%d) returned %d",
|
||||
warnx("fill_blocks: write(%d) returned %zd",
|
||||
BLOCKSIZE, len);
|
||||
close(fd);
|
||||
(void)unlink(BLOCKS_FILENAME);
|
||||
|
Loading…
x
Reference in New Issue
Block a user