summaryrefslogtreecommitdiff
path: root/libc/inet/rpc/xdr_stdio.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-23 23:22:10 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-23 23:22:10 +0000
commitcc479c5abf86e0014cf6bc3492bbf53a47f503fc (patch)
treef6d242ea42993b010612c28cfcbc5228cee94549 /libc/inet/rpc/xdr_stdio.c
parenta1d98e054e1d2a3481f897fb40f98972a57c74d9 (diff)
sync with glibc
Diffstat (limited to 'libc/inet/rpc/xdr_stdio.c')
-rw-r--r--libc/inet/rpc/xdr_stdio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libc/inet/rpc/xdr_stdio.c b/libc/inet/rpc/xdr_stdio.c
index 8bd08590d..32689e132 100644
--- a/libc/inet/rpc/xdr_stdio.c
+++ b/libc/inet/rpc/xdr_stdio.c
@@ -61,7 +61,7 @@ static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int);
static bool_t xdrstdio_putbytes (XDR *, const char *, u_int);
static u_int xdrstdio_getpos (const XDR *);
static bool_t xdrstdio_setpos (XDR *, u_int);
-static int32_t *xdrstdio_inline (XDR *, int);
+static int32_t *xdrstdio_inline (XDR *, u_int);
static void xdrstdio_destroy (XDR *);
static bool_t xdrstdio_getint32 (XDR *, int32_t *);
static bool_t xdrstdio_putint32 (XDR *, const int32_t *);
@@ -114,20 +114,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;
}
@@ -163,7 +163,7 @@ xdrstdio_setpos (XDR *xdrs, u_int pos)
}
static int32_t *
-xdrstdio_inline (XDR *xdrs attribute_unused, int len attribute_unused)
+xdrstdio_inline (XDR *xdrs attribute_unused, u_int len attribute_unused)
{
/*
* Must do some work to implement this: must insure