diff options
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/xdr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index 0cb5f25332..e5d706dd20 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -181,7 +181,15 @@ xdr_u_long (XDR *xdrs, u_long *ulp) switch (xdrs->x_op) { case XDR_DECODE: - return XDR_GETLONG (xdrs, (long *) ulp); + { + long int tmp; + + if (XDR_GETLONG (xdrs, &tmp) == FALSE) + return FALSE; + + *ulp = (uint32_t) tmp; + return TRUE; + } case XDR_ENCODE: return XDR_PUTLONG (xdrs, (long *) ulp); |