diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-09-10 20:41:44 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-09-11 03:42:50 +0000 |
commit | 33e5f0eba223feab8f23d519f2d36bc544934584 (patch) | |
tree | f4f102db6fc7d3ee0f2198e9613663e2091b1b76 /epan/dissectors/packet-lustre.c | |
parent | 5bd04a317d1308c4a702965301ec431e466ba7ea (diff) |
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>
Diffstat (limited to 'epan/dissectors/packet-lustre.c')
-rw-r--r-- | epan/dissectors/packet-lustre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-lustre.c b/epan/dissectors/packet-lustre.c index 461ac04ea9..681a7a13ca 100644 --- a/epan/dissectors/packet-lustre.c +++ b/epan/dissectors/packet-lustre.c @@ -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; |