diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-08-10 22:55:02 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-08-10 22:55:02 +0000 |
commit | eadd88560df528848a305d3c02d370e88a347fc9 (patch) | |
tree | 5bfcabbb83a6e7359cfc302cdc604264560d66a0 /epan/dissectors/packet-rpl.c | |
parent | 43ca6a305349c1e81dc31e79016abe7743650d4b (diff) |
Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44438 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-rpl.c')
-rw-r--r-- | epan/dissectors/packet-rpl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rpl.c b/epan/dissectors/packet-rpl.c index 022a0bd615..ef7b99d63c 100644 --- a/epan/dissectors/packet-rpl.c +++ b/epan/dissectors/packet-rpl.c @@ -110,7 +110,7 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) type = tvb_get_ntohs(tvb, 2); proto_tree_add_text(tree, tvb, 2, 2, "Type: %s", - val_to_str(type, rpl_type_vals, "Unknown Type")); + val_to_str_const(type, rpl_type_vals, "Unknown Type")); offset = 4; switch (type) { @@ -138,8 +138,10 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(subtyp == 0xc005) ett_type = ett_rpl_c005; if(subtyp == 0xc014) ett_type = ett_rpl_c014; ti = proto_tree_add_text(tree, tvb, - offset, sublen, "%s", val_to_str(subtyp, - rpl_type_vals, "Unknown Type")); + offset, sublen, "%s", + val_to_str_const(subtyp, + rpl_type_vals, + "Unknown Type")); rpl_container_tree = proto_item_add_subtree(ti, ett_type); length = tvb_length_remaining(tvb, offset); |