Fri Jul 19 15:10:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
authorroland <roland>
Fri, 19 Jul 1996 22:21:43 +0000 (22:21 +0000)
committerroland <roland>
Fri, 19 Jul 1996 22:21:43 +0000 (22:21 +0000)
* sunrpc/xdr_mem.c (xdrmem_putlong): Don't cast LP to int32 (the
  old code would have failed on a big-endian 64-bit architecture).
* sunrpc/xdr_stdio.c (xdrstdio_putlong): Ditto.

sunrpc/xdr_mem.c
sunrpc/xdr_stdio.c

index ac7c954..d6241e7 100644 (file)
@@ -112,7 +112,7 @@ xdrmem_putlong(xdrs, lp)
 
        if ((xdrs->x_handy -= 4) < 0)
                return (FALSE);
-       *(int32_t *)xdrs->x_private = (long)htonl((u_long)(*(int32_t*)lp));
+       *(int32_t *)xdrs->x_private = htonl(*lp);
        xdrs->x_private += 4;
        return (TRUE);
 }
index 5f01699..151e5e4 100644 (file)
@@ -118,7 +118,7 @@ xdrstdio_putlong(xdrs, lp)
        long *lp;
 {
 
-       int32_t  mycopy = htonl(*(int32_t*)lp);
+       int32_t  mycopy = htonl(*lp);
        lp = &mycopy;
        if (fwrite((caddr_t)lp, 4, 1, (FILE *)xdrs->x_private) != 1)
                return (FALSE);