aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-09-13 16:39:17 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-09-13 16:39:17 +0000
commitbad7e36ffb7d17029fc0a059fd43c5517c3074d6 (patch)
tree105fbec081fb2890827ba261ccaae5ac94a1efc1
parent3360d44ea9b6ff68ac055ea7bacb3a1ef3442773 (diff)
As the man said, ports are unsigned.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38987 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-coap.c4
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);