From 55a24b753a4f6e03ed23e16b2be847bd5c5642a7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 24 Mar 2005 08:19:18 +0000 Subject: Updated to fedora-glibc-20050324T0715 --- sunrpc/xdr_stdio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sunrpc') 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; } -- cgit 1.4.1