aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-coap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-09-13 16:39:17 +0000
committerGuy Harris <guy@alum.mit.edu>2011-09-13 16:39:17 +0000
commitddd33066bb44095a31f7322fa467ff73e9ae4781 (patch)
tree105fbec081fb2890827ba261ccaae5ac94a1efc1 /epan/dissectors/packet-coap.c
parentabdd48d5e3371b5997e9fa18d944d718c603d9fa (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.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);