From 43f591357a73b5a1ae586ad163488a63d4921b51 Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 29 Jan 2001 08:47:44 +0000 Subject: Fix some log_Printf() casting; NetBSD (pkgsrc) --- usr.sbin/ppp/ppp/atm.c | 6 +++--- usr.sbin/ppp/ppp/ip.c | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'usr.sbin/ppp') diff --git a/usr.sbin/ppp/ppp/atm.c b/usr.sbin/ppp/ppp/atm.c index 5c9c8ef0ee6..902c5c85f3d 100644 --- a/usr.sbin/ppp/ppp/atm.c +++ b/usr.sbin/ppp/ppp/atm.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: atm.c,v 1.2 2000/09/14 22:03:23 brian Exp $ + * $OpenBSD: atm.c,v 1.3 2001/01/29 08:47:43 brian Exp $ */ #include @@ -79,7 +79,7 @@ atm_Sendto(struct physical *p, const void *v, size_t n) { ssize_t ret = write(p->fd, v, n); if (ret < 0) { - log_Printf(LogDEBUG, "atm_Sendto(%d): %s\n", n, strerror(errno)); + log_Printf(LogDEBUG, "atm_Sendto(%ld): %s\n", (long)n, strerror(errno)); return ret; } return ret; @@ -90,7 +90,7 @@ atm_Recvfrom(struct physical *p, void *v, size_t n) { ssize_t ret = read(p->fd, (char*)v, n); if (ret < 0) { - log_Printf(LogDEBUG, "atm_Recvfrom(%d): %s\n", n, strerror(errno)); + log_Printf(LogDEBUG, "atm_Recvfrom(%ld): %s\n", (long)n, strerror(errno)); return ret; } return ret; diff --git a/usr.sbin/ppp/ppp/ip.c b/usr.sbin/ppp/ppp/ip.c index 9f30aaa4cd0..c650bc547be 100644 --- a/usr.sbin/ppp/ppp/ip.c +++ b/usr.sbin/ppp/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $OpenBSD: ip.c,v 1.27 2000/09/14 18:04:14 brian Exp $ + * $OpenBSD: ip.c,v 1.28 2001/01/29 08:47:43 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -651,9 +651,8 @@ PacketCheck(struct bundle *bundle, unsigned char *cp, int nb, snprintf(logbuf + loglen, sizeof logbuf - loglen, "ESP: %s ---> ", inet_ntoa(pip->ip_src)); loglen += strlen(logbuf + loglen); - snprintf(logbuf + loglen, sizeof logbuf - loglen, - "%s, spi %08x", inet_ntoa(pip->ip_dst), - (u_int32_t) ptop); + snprintf(logbuf + loglen, sizeof logbuf - loglen, "%s, spi %p", + inet_ntoa(pip->ip_dst), ptop); loglen += strlen(logbuf + loglen); } break; @@ -663,9 +662,8 @@ PacketCheck(struct bundle *bundle, unsigned char *cp, int nb, snprintf(logbuf + loglen, sizeof logbuf - loglen, "AH: %s ---> ", inet_ntoa(pip->ip_src)); loglen += strlen(logbuf + loglen); - snprintf(logbuf + loglen, sizeof logbuf - loglen, - "%s, spi %08x", inet_ntoa(pip->ip_dst), - (u_int32_t) (ptop + sizeof(u_int32_t))); + snprintf(logbuf + loglen, sizeof logbuf - loglen, "%s, spi %p", + inet_ntoa(pip->ip_dst), ptop + sizeof(u_int32_t)); loglen += strlen(logbuf + loglen); } break; -- cgit v1.2.3