sizeof isn't useful when calculating the size of data in the packet.

Srsly, you're dealing with *four-byte* value, might as well say "4" -
either sizeof(guint32) is guaranteed to be 4, in which case you might as
well just use 4, or it's *not* guaranteed to be 4, in which case you
*have* to use 4, because a value other than 4 is invalid.

Change-Id: I6deb106f326e9402744a2e728468b3ce4c220b02
Reviewed-on: https://code.wireshark.org/review/29586
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-09-10 20:41:44 -07:00
parent 5bd04a317d
commit 33e5f0eba2
1 changed files with 2 additions and 2 deletions

View File

@ -804,7 +804,7 @@ static expert_field ei_lustre_obsopc = EI_INIT;
/* LUSTRE_BUFFER_LEN(buffnum) */
#define LUSTRE_BUFFER_LEN(_n) (LUSTRE_BUFCOUNT <= (_n) ? 0 \
: tvb_get_letohl(tvb, LUSTRE_BUFLEN_OFF+ \
sizeof(guint32)*(_n)))
4*(_n)))
#define LUSTRE_REC_OFF 1 /* normal request/reply record offset */
@ -4536,7 +4536,7 @@ dissect_xattr_buffers(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
datalen = LUSTRE_BUFFER_LEN(buff_num+1);
lenlen = LUSTRE_BUFFER_LEN(buff_num+2);
count = lenlen / sizeof(guint32);
count = lenlen / 4;
namestart = nameoffset = offset;
datastart = namestart + namelen;