summaryrefslogtreecommitdiff
path: root/cpukit/librpc/src/rpc/clnt_udp.c
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2013-03-19 13:29:58 +0100
committerDaniel Hellstrom <daniel@gaisler.com>2013-03-19 13:29:58 +0100
commit0e0c086ee95d95fa7e2edf56f313758a892e1cac (patch)
treeb4f2de0d2b2587e59259d12eaeb54cc19629f169 /cpukit/librpc/src/rpc/clnt_udp.c
parent944f85f0e00877ca946efda9cd1767c4ce2c449b (diff)
parent0ae9ee1da48d7deab49e42aa789ba02de8501047 (diff)
Merge official 4.10.2 sources into rcc-1.2 branchrcc-v1.2.9
Diffstat (limited to 'cpukit/librpc/src/rpc/clnt_udp.c')
-rw-r--r--cpukit/librpc/src/rpc/clnt_udp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/cpukit/librpc/src/rpc/clnt_udp.c b/cpukit/librpc/src/rpc/clnt_udp.c
index aeace640a8..369da95f2d 100644
--- a/cpukit/librpc/src/rpc/clnt_udp.c
+++ b/cpukit/librpc/src/rpc/clnt_udp.c
@@ -88,9 +88,17 @@ struct cu_data {
XDR cu_outxdrs;
u_int cu_xdrpos;
u_int cu_sendsz; /* send size */
- char *cu_outbuf;
+ union {
+ u_int32_t *i32;
+ char *c;
+ } _cu_outbuf;
+#define cu_outbuf _cu_outbuf.c
u_int cu_recvsz; /* recv size */
- char cu_inbuf[1];
+ union {
+ u_int32_t *i32;
+ char c[1];
+ } _cu_inbuf;
+#define cu_inbuf _cu_inbuf.c
};
/*
@@ -352,7 +360,7 @@ send_again:
if (inlen < sizeof(u_int32_t))
continue;
/* see if reply transaction id matches sent id */
- if (*((u_int32_t *)(cu->cu_inbuf)) != *((u_int32_t *)(cu->cu_outbuf)))
+ if (*(cu->_cu_inbuf.i32) != *(cu->_cu_outbuf.i32))
continue;
/* we now assume we have the proper reply */
break;