diff options
author | brian <brian@FreeBSD.org> | 2000-03-14 01:47:19 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-03-14 01:47:19 +0000 |
commit | 19ff2ab337c997a28964c88f5124a07dff48a0e4 (patch) | |
tree | 0966e729b0750c437da397c795c45cd9466d7780 /usr.sbin/ppp/bundle.c | |
parent | 84a11d130e87abbc875a0c5c29e560b04560c73c (diff) | |
download | FreeBSD-src-19ff2ab337c997a28964c88f5124a07dff48a0e4.zip FreeBSD-src-19ff2ab337c997a28964c88f5124a07dff48a0e4.tar.gz |
Fix some printf-style argument bugs
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r-- | usr.sbin/ppp/bundle.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 859a63e..f9a9cce 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -1439,14 +1439,15 @@ bundle_ReceiveDatalink(struct bundle *bundle, int s) msg.msg_control = cmsgbuf; msg.msg_controllen = sizeof cmsgbuf; - log_Printf(LogDEBUG, "Expecting %d scatter/gather bytes\n", iov[0].iov_len); + log_Printf(LogDEBUG, "Expecting %u scatter/gather bytes\n", + (unsigned)iov[0].iov_len); if ((got = recvmsg(s, &msg, MSG_WAITALL)) != iov[0].iov_len) { if (got == -1) log_Printf(LogERROR, "Failed recvmsg: %s\n", strerror(errno)); else - log_Printf(LogERROR, "Failed recvmsg: Got %d, not %d\n", - got, iov[0].iov_len); + log_Printf(LogERROR, "Failed recvmsg: Got %d, not %u\n", + got, (unsigned)iov[0].iov_len); while (niov--) free(iov[niov].iov_base); return; @@ -1623,15 +1624,16 @@ bundle_SendDatalink(struct datalink *dl, int s, struct sockaddr_un *sun) log_Printf(LogERROR, "setsockopt(SO_RCVBUF, %d): %s\n", expect, strerror(errno)); - log_Printf(LogDEBUG, "Sending %d descriptor%s and %d bytes in scatter" - "/gather array\n", nfd, nfd == 1 ? "" : "s", iov[0].iov_len); + log_Printf(LogDEBUG, "Sending %d descriptor%s and %u bytes in scatter" + "/gather array\n", nfd, nfd == 1 ? "" : "s", + (unsigned)iov[0].iov_len); if ((got = sendmsg(s, &msg, 0)) == -1) log_Printf(LogERROR, "Failed sendmsg: %s: %s\n", sun->sun_path, strerror(errno)); else if (got != iov[0].iov_len) - log_Printf(LogERROR, "%s: Failed initial sendmsg: Only sent %d of %d\n", - sun->sun_path, got, iov[0].iov_len); + log_Printf(LogERROR, "%s: Failed initial sendmsg: Only sent %d of %u\n", + sun->sun_path, got, (unsigned)iov[0].iov_len); else { /* We must get the ACK before closing the descriptor ! */ int res; |