summaryrefslogtreecommitdiff
path: root/sunrpc/xdr_stdio.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sunrpc/xdr_stdio.c
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
2.5-18.1
Diffstat (limited to 'sunrpc/xdr_stdio.c')
-rw-r--r--sunrpc/xdr_stdio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
index 4daa062c82..e73c5a5202 100644
--- a/sunrpc/xdr_stdio.c
+++ b/sunrpc/xdr_stdio.c
@@ -108,20 +108,20 @@ xdrstdio_destroy (XDR *xdrs)
static bool_t
xdrstdio_getlong (XDR *xdrs, long *lp)
{
- int32_t mycopy;
+ u_int32_t mycopy;
- if (fread ((caddr_t) & mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+ if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
return FALSE;
- *lp = (int32_t) ntohl (mycopy);
+ *lp = (long) ntohl (mycopy);
return TRUE;
}
static bool_t
xdrstdio_putlong (XDR *xdrs, const long *lp)
{
- long mycopy = htonl (*lp);
- lp = &mycopy;
- if (fwrite ((caddr_t) lp, 4, 1, (FILE *) xdrs->x_private) != 1)
+ int32_t mycopy = htonl ((u_int32_t) *lp);
+
+ if (fwrite ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
return FALSE;
return TRUE;
}