diff options
Diffstat (limited to 'epan/dissectors/packet-coap.c')
-rw-r--r-- | epan/dissectors/packet-coap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index 910f2dad82..9fa14e11cf 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -316,10 +316,10 @@ dissect_coap_opt_port(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, gi proto_item_append_text(item, " (default)"); return; case 1: - g_snprintf(portstr, sizeof(portstr), "%d", (int)tvb_get_guint8(tvb, offset)); + g_snprintf(portstr, sizeof(portstr), "%u", tvb_get_guint8(tvb, offset)); break; case 2: - g_snprintf(portstr, sizeof(portstr), "%d", (int)tvb_get_ntohs(tvb, offset)); + g_snprintf(portstr, sizeof(portstr), "%u", tvb_get_ntohs(tvb, offset)); break; default: expert_add_info_format(pinfo, subtree, PI_MALFORMED, PI_WARN, "Invalid Option Length: %d", opt_length); |