diff options
author | 2001-09-17 18:34:51 +0000 | |
---|---|---|
committer | 2001-09-17 18:34:51 +0000 | |
commit | e16fc2b266eed9d4caf4eead8cc57d28de7b7030 (patch) | |
tree | b7c85c09a0833c2a1fce5f52cf61a7a7fa4458a1 | |
parent | zap kernfs (diff) | |
download | wireguard-openbsd-e16fc2b266eed9d4caf4eead8cc57d28de7b7030.tar.xz wireguard-openbsd-e16fc2b266eed9d4caf4eead8cc57d28de7b7030.zip |
cast a few more long's to int32_t
-rw-r--r-- | lib/libc/rpc/xdr_mem.c | 6 | ||||
-rw-r--r-- | lib/libc/rpc/xdr_stdio.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/rpc/xdr_mem.c b/lib/libc/rpc/xdr_mem.c index de0ad3c92f6..b9a8495643f 100644 --- a/lib/libc/rpc/xdr_mem.c +++ b/lib/libc/rpc/xdr_mem.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.7 2001/09/15 13:51:01 deraadt Exp $"; +static char *rcsid = "$OpenBSD: xdr_mem.c,v 1.8 2001/09/17 18:34:51 jason Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -129,7 +129,7 @@ xdrmem_putlong_aligned(xdrs, lp) if ((xdrs->x_handy -= sizeof(int32_t)) < 0) return (FALSE); - *(int32_t *)xdrs->x_private = htonl(*lp); + *(int32_t *)xdrs->x_private = htonl((u_int32_t)*lp); xdrs->x_private += sizeof(int32_t); return (TRUE); } @@ -158,7 +158,7 @@ xdrmem_putlong_unaligned(xdrs, lp) if ((xdrs->x_handy -= sizeof(int32_t)) < 0) return (FALSE); - l = htonl(*lp); + l = htonl((u_int32_t)*lp); memcpy(xdrs->x_private, &l, sizeof(int32_t)); xdrs->x_private += sizeof(int32_t); return (TRUE); diff --git a/lib/libc/rpc/xdr_stdio.c b/lib/libc/rpc/xdr_stdio.c index 902a7458fc2..799695f1066 100644 --- a/lib/libc/rpc/xdr_stdio.c +++ b/lib/libc/rpc/xdr_stdio.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.5 2001/09/15 13:51:01 deraadt Exp $"; +static char *rcsid = "$OpenBSD: xdr_stdio.c,v 1.6 2001/09/17 18:34:51 jason Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -108,7 +108,7 @@ xdrstdio_getlong(xdrs, lp) if (fread((caddr_t)lp, sizeof(int32_t), 1, (FILE *)xdrs->x_private) != 1) return (FALSE); - *lp = (long)ntohl((int32_t)*lp); + *lp = (long)ntohl((u_int32_t)*lp); return (TRUE); } @@ -117,7 +117,7 @@ xdrstdio_putlong(xdrs, lp) XDR *xdrs; long *lp; { - long mycopy = (long)htonl((int32_t)*lp); + long mycopy = (long)htonl((u_int32_t)*lp); if (fwrite((caddr_t)&mycopy, sizeof(int32_t), 1, (FILE *)xdrs->x_private) != 1) |