diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-04-09 22:16:28 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-04-10 05:17:09 +0000 |
commit | bbd014288772354a6d84ed1dff6394c01702400e (patch) | |
tree | d5984726215c150cf3438c2311a6198fd7234be9 /epan | |
parent | 2c7b678d7eeeeae639d32b433fcf0405798a6252 (diff) |
Nb is an unsigned value; treat it as such.
Use proto_tree_add_item_ret_uint() to get its value, while we're at it.
Change-Id: I734da5f588d9a89e810490d657c09b9ad2ff08dd
Reviewed-on: https://code.wireshark.org/review/26841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-wreth.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-wreth.c b/epan/dissectors/packet-wreth.c index f718e2be43..d65b38a9a7 100644 --- a/epan/dissectors/packet-wreth.c +++ b/epan/dissectors/packet-wreth.c @@ -1092,7 +1092,7 @@ gint WrethMailDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, prot { proto_item *mi; proto_tree *pWrethMailboxTree; - gint Nb = 0; + guint32 Nb = 0; guint16 Codef = 0; mi = proto_tree_add_protocol_format(pWrethTree, wreth_proto, tvb, Offset, -1, "MailBox"); @@ -1144,8 +1144,7 @@ gint WrethMailDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, prot proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nes, tvb, Offset, 2, ENC_LITTLE_ENDIAN); Offset += 2; /*Mail Nb*/ - Nb = (gint)tvb_get_letohs(tvb,Offset); - proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nb, tvb, Offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item_ret_uint(pWrethMailboxTree, hf_Wreth_Mail_Nb, tvb, Offset, 2, ENC_LITTLE_ENDIAN, &Nb); Offset += 2; /*Mail TypVar*/ proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_TypVar, tvb, Offset, 2, ENC_LITTLE_ENDIAN); |