summaryrefslogtreecommitdiff
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-09-17 18:34:52 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-09-17 18:34:52 +0000
commit90f8dbf473dab6cbc5ce6d5fd7feff9e6c3de390 (patch)
treecac27e300d9f2adc7583665094eea7b8d3ffa57f /lib/libc/rpc
parent7447f1cbaf64a0a986a10ef9ce151d6f53229738 (diff)
cast a few more long's to int32_t
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/xdr_mem.c6
-rw-r--r--lib/libc/rpc/xdr_stdio.c6
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)