From 260799afa40015f085423d34dce4de3e2d828599 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sun, 19 Aug 2001 22:23:28 +0000 Subject: Add some casts. Not spotted by: FreeBSD's gcc version 2.95.3 20010315 (release) Spotted by: OpenBSD's gcc version 2.95.3 20010125 (prerelease) --- usr.sbin/ppp/ncpaddr.c | 2 +- usr.sbin/ppp/server.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ppp') diff --git a/usr.sbin/ppp/ncpaddr.c b/usr.sbin/ppp/ncpaddr.c index 62b5e7f49ab4..64a917d1da18 100644 --- a/usr.sbin/ppp/ncpaddr.c +++ b/usr.sbin/ppp/ncpaddr.c @@ -831,7 +831,7 @@ ncprange_ntoa(const struct ncprange *range) if (strcmp(res + len - 2, ".0")) break; snprintf(res + len, sizeof res - len, "&0x%08lx", - ntohl(range->ncprange_ip4mask.s_addr)); + (unsigned long)ntohl(range->ncprange_ip4mask.s_addr)); } else if (range->ncprange_ip4width < 32) snprintf(res + len, sizeof res - len, "/%d", range->ncprange_ip4width); diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c index cb25f9291ad5..c696771ecfc3 100644 --- a/usr.sbin/ppp/server.c +++ b/usr.sbin/ppp/server.c @@ -326,7 +326,7 @@ server_TcpOpen(struct bundle *bundle, u_short port) if (probe.ipv6_available) { sin6->sin6_family = AF_INET6; sin6->sin6_port = htons(port); - sin6->sin6_len = sizeof ss; + sin6->sin6_len = (u_int8_t)sizeof ss; sz = sizeof *sin6; s = socket(PF_INET6, SOCK_STREAM, 0); } else @@ -334,7 +334,7 @@ server_TcpOpen(struct bundle *bundle, u_short port) { sin->sin_family = AF_INET; sin->sin_port = htons(port); - sin->sin_len = sizeof ss; + sin->sin_len = (u_int8_t)sizeof ss; sin->sin_addr.s_addr = INADDR_ANY; sz = sizeof *sin; s = socket(PF_INET, SOCK_STREAM, 0); -- cgit v1.2.3