From 90f8dbf473dab6cbc5ce6d5fd7feff9e6c3de390 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Mon, 17 Sep 2001 18:34:52 +0000 Subject: cast a few more long's to int32_t --- lib/libc/rpc/xdr_mem.c | 6 +++--- lib/libc/rpc/xdr_stdio.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/libc/rpc') 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) -- cgit v1.2.3