diff options
author | Roland McGrath <roland@gnu.org> | 2002-12-16 02:05:55 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-12-16 02:05:55 +0000 |
commit | fd4c894c2391fefd1794aeede627e2c9c8f4dae7 (patch) | |
tree | 88ac319ff92e54fe9063870389e0ae7bc991e71f /sunrpc/xdr_sizeof.c | |
parent | 0274d73c41a807eeb10866f5211d727a5bc51b5c (diff) | |
download | glibc-fd4c894c2391fefd1794aeede627e2c9c8f4dae7.tar.gz glibc-fd4c894c2391fefd1794aeede627e2c9c8f4dae7.tar.xz glibc-fd4c894c2391fefd1794aeede627e2c9c8f4dae7.zip |
* sunrpc/rpc/xdr.h (struct XDR.xdr_ops.x_inline): 2nd arg
is now u_int, not int. (struct XDR.x_handy): Now u_int, not int. * sunrpc/xdr_mem.c: Include <limits.h>. (xdrmem_getlong, xdrmem_putlong, xdrmem_getbytes, xdrmem_putbytes, xdrmem_inline, xdrmem_getint32, xdrmem_putint32): x_handy is now unsigned, not signed. Do not decrement x_handy if no change is made. (xdrmem_setpos): Check for int overflow. * sunrpc/xdr_sizeof.c (x_inline): 2nd arg is now unsigned. (xdr_sizeof): Remove cast that is now unnecessary, now that x_handy is unsigned.
Diffstat (limited to 'sunrpc/xdr_sizeof.c')
-rw-r--r-- | sunrpc/xdr_sizeof.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sunrpc/xdr_sizeof.c b/sunrpc/xdr_sizeof.c index 76b53d9d57..aaf25e9699 100644 --- a/sunrpc/xdr_sizeof.c +++ b/sunrpc/xdr_sizeof.c @@ -71,13 +71,13 @@ x_setpostn (XDR *xdrs, u_int len) } static int32_t * -x_inline (XDR *xdrs, int len) +x_inline (XDR *xdrs, u_int len) { if (len == 0) return NULL; if (xdrs->x_op != XDR_ENCODE) return NULL; - if (len < (int) (long int) xdrs->x_base) + if (len < (u_int) (long int) xdrs->x_base) { /* x_private was already allocated */ xdrs->x_handy += len; @@ -159,5 +159,5 @@ xdr_sizeof (xdrproc_t func, void *data) stat = func (&x, data); if (x.x_private) free (x.x_private); - return stat == TRUE ? (unsigned) x.x_handy : 0; + return stat == TRUE ? x.x_handy : 0; } |