diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-09-13 16:39:17 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-09-13 16:39:17 +0000 |
commit | ddd33066bb44095a31f7322fa467ff73e9ae4781 (patch) | |
tree | 105fbec081fb2890827ba261ccaae5ac94a1efc1 /epan/dissectors/packet-coap.c | |
parent | abdd48d5e3371b5997e9fa18d944d718c603d9fa (diff) |
As the man said, ports are unsigned.
svn path=/trunk/; revision=38987
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); |