From 9845b85764a8542b4399873953fa47040caf6ec2 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Fri, 5 Oct 2001 22:30:12 +0000 Subject: [PATCH] rx-warnings-cleanup-20011005 add header, pull ++ out of ntohl --- src/rx/rx_clock.c | 1 + src/rx/rx_packet.c | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/rx/rx_clock.c b/src/rx/rx_clock.c index e27c62626..5d94973a6 100644 --- a/src/rx/rx_clock.c +++ b/src/rx/rx_clock.c @@ -33,6 +33,7 @@ RCSID("$Header$"); #include #include #include +#include #include "rx_clock.h" #endif diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index e9b6c2a0a..8b7051eca 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -1854,18 +1854,29 @@ register struct rx_packet *p; register afs_uint32 *buf = (afs_uint32*)(p->wirevec[0].iov_base); /* MTUXXX */ afs_uint32 temp; - p->header.epoch = ntohl(*buf++); - p->header.cid = ntohl(*buf++); - p->header.callNumber = ntohl(*buf++); - p->header.seq = ntohl(*buf++); - p->header.serial = ntohl(*buf++); - temp = ntohl(*buf++); + p->header.epoch = ntohl(*buf); + buf++; + p->header.cid = ntohl(*buf); + buf++; + p->header.callNumber = ntohl(*buf); + buf++; + p->header.seq = ntohl(*buf); + buf++; + p->header.serial = ntohl(*buf); + buf++; + + temp = ntohl(*buf); + buf++; + /* C will truncate byte fields to bytes for me */ p->header.type = temp>>24; p->header.flags = temp>>16; p->header.userStatus = temp>>8; p->header.securityIndex = temp>>0; - temp = ntohl(*buf++); + + temp = ntohl(*buf); + buf++; + p->header.serviceId = (temp&0xffff); p->header.spare = temp>>16; /* Note: top 16 bits of this last word are the security checksum */ -- 2.39.5