aboutsummaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/xdr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c
index 0cb5f25..e5d706d 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);