diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-02-03 22:04:19 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-02-03 22:04:19 +0000 |
commit | 35caaca843e6f4bf3e81e741f3e3cd8dd0c4b213 (patch) | |
tree | d6bc652ad59bbfdbe13239dab993c3f721a5425a /epan/dissectors/packet-pcep.c | |
parent | 2ab4ffe8ca9c79cad5ab0cb4932d20758eff9dde (diff) |
Store the result of tvb_get_ntohs() in a guint16 instead of a guint8 to avoid a
compiler warning. (It looks like the only expected values will fit in 8 bits,
but it also appears that the code really is expecting 'of_code' to be stored in
16 bits on the wire.)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35790 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-pcep.c')
-rw-r--r-- | epan/dissectors/packet-pcep.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c index 1b35146c9f..1ab5cef39a 100644 --- a/epan/dissectors/packet-pcep.c +++ b/epan/dissectors/packet-pcep.c @@ -633,11 +633,11 @@ dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, gint length, switch (tlv_type) { case 1: /* NO-PATH TLV */ - proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "%s", + proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "%s", decode_boolean_bitfield(tvb_get_ntohl(tvb, offset+4+j), 0x0001, 32, "PCE currently unavailable", "")); - proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "%s", + proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "%s", decode_boolean_bitfield(tvb_get_ntohl(tvb, offset+4+j), 0x0002, 32, "Unknown destination", "")); - proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "%s", + proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "%s", decode_boolean_bitfield(tvb_get_ntohl(tvb, offset+4+j), 0x0004, 32, "Unknown source", "")); break; @@ -653,7 +653,7 @@ dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, gint length, break; default: - proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "Data: %s", + proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "Data: %s", bytestring_to_str(tvb_get_ptr(tvb, (offset) + 4 + j, tlv_length), tlv_length, ' ')); } @@ -1364,7 +1364,7 @@ dissect_pcep_bandwidth_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offs *------------------------------------------------------------------------------*/ #define METRIC_OBJ_LEN 8 -static void +static void dissect_pcep_metric_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length) { @@ -1900,7 +1900,7 @@ dissect_pcep_close_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, /*------------------------------------------------------------------------------ * PATH-KEY OBJECT *------------------------------------------------------------------------------*/ -static void +static void dissect_pcep_path_key_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length) { @@ -1950,8 +1950,8 @@ dissect_pcep_path_key_obj(proto_tree *pcep_object_tree, } /*------------------------------------------------------------------------------ - * XRO OBJECT - *------------------------------------------------------------------------------*/ + * XRO OBJECT + *------------------------------------------------------------------------------*/ #define XRO_OBJ_MIN_LEN 4 static void @@ -2048,10 +2048,10 @@ dissect_pcep_xro_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, i *------------------------------------------------------------------------------*/ #define OF_OBJ_MIN_LEN 4 -static void +static void dissect_pcep_of_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length) -{ - guint8 of_code; +{ + guint16 of_code; if (obj_length < OBJ_HDR_LEN+OF_OBJ_MIN_LEN) { proto_tree_add_text(pcep_object_tree, tvb, offset2, obj_length, |