From c870d249d294c92c677e09437a53873cea563b8b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Dec 1998 21:59:20 +0000 Subject: [PATCH] Update. 1998-12-14 Ulrich Drepper * sunrpc/rpc/xdr.h (IXDR_GET_INT32): Case pointer before reading from it. (IXDR_PUT_INT32): Likewise for writing. --- ChangeLog | 6 ++++++ sunrpc/rpc/xdr.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ccb10a..e2ef5ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-12-14 Ulrich Drepper + + * sunrpc/rpc/xdr.h (IXDR_GET_INT32): Case pointer before reading from + it. + (IXDR_PUT_INT32): Likewise for writing. + 1998-12-08 H.J. Lu * sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Don't clear diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h index cd28717..192a9a8 100644 --- a/sunrpc/rpc/xdr.h +++ b/sunrpc/rpc/xdr.h @@ -249,8 +249,9 @@ struct xdr_discrim * of external representation. */ -#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++)) -#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)v)) +#define IXDR_GET_INT32(buf) ((int32_t)ntohl(*((uint32_t *) buf)++)) +#define IXDR_PUT_INT32(buf, v) (*((int32_t *) buf)++ \ + = (int32_t)htonl((uint32_t)v)) #define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf)) #define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v))) -- 2.7.4