diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-08-10 22:55:02 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-08-10 22:55:02 +0000 |
commit | 638d74d43f9baf45dc3641939eec36f801414187 (patch) | |
tree | 5bfcabbb83a6e7359cfc302cdc604264560d66a0 /epan/dissectors/packet-juniper.c | |
parent | e6ffe7b59b9f36c534d3b2d6cc78b05dfe517f67 (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
svn path=/trunk/; revision=44438
Diffstat (limited to 'epan/dissectors/packet-juniper.c')
-rw-r--r-- | epan/dissectors/packet-juniper.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-juniper.c b/epan/dissectors/packet-juniper.c index 9dca8cff30..8c94f36461 100644 --- a/epan/dissectors/packet-juniper.c +++ b/epan/dissectors/packet-juniper.c @@ -530,11 +530,11 @@ dissect_juniper_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot proto_tree_add_uint_format (juniper_subtree, hf_juniper_direction, tvb, 3, 1, direction, "Direction: %s", - val_to_str(direction,juniper_direction_vals,"Unknown")); + val_to_str_const(direction,juniper_direction_vals,"Unknown")); proto_tree_add_uint_format (juniper_subtree, hf_juniper_l2hdr_presence, tvb, 3, 1, l2hdr_presence, "L2-header: %s", - val_to_str(l2hdr_presence,juniper_l2hdr_presence_vals,"Unknown")); + val_to_str_const(l2hdr_presence,juniper_l2hdr_presence_vals,"Unknown")); /* calculate hdr_len before cookie, payload */ @@ -555,7 +555,7 @@ dissect_juniper_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot tisub = proto_tree_add_text (juniper_ext_subtree, tvb, ext_offset, EXT_TLV_HEADER_SIZE + ext_len, "%s Extension TLV #%u, length: %u", - val_to_str(ext_type, ext_tlv_vals, "Unknown"), + val_to_str_const(ext_type, ext_tlv_vals, "Unknown"), ext_type, ext_len); @@ -626,7 +626,7 @@ dissect_juniper_payload_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre guint8 nlpid; proto_tree_add_text (juniper_subtree, tvb, offset, 0, "[Payload Type: %s]", - val_to_str(proto,juniper_proto_vals,"Unknown")); + val_to_str_const(proto,juniper_proto_vals,"Unknown")); next_tvb = tvb_new_subset_remaining(tvb, offset); |