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-slimp3.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-slimp3.c')
-rw-r--r-- | epan/dissectors/packet-slimp3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-slimp3.c b/epan/dissectors/packet-slimp3.c index f39b48ae7b..8ae0a117cf 100644 --- a/epan/dissectors/packet-slimp3.c +++ b/epan/dissectors/packet-slimp3.c @@ -314,7 +314,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) i1/625000, i1); i1 = tvb_get_guint8(tvb, offset+6); proto_tree_add_text(slimp3_tree, tvb, offset+6, 1, "Code identifier: 0x%0x: %s", - i1, val_to_str(i1, slimp3_ir_types, "Unknown")); + i1, val_to_str_const(i1, slimp3_ir_types, "Unknown")); proto_tree_add_text(slimp3_tree, tvb, offset+7, 1, "Code bits: %d", tvb_get_guint8(tvb, offset+7)); @@ -325,14 +325,14 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* This is the custom SLIMP3 remote. */ proto_tree_add_text(slimp3_tree, tvb, offset+8, 4, "Infrared Code: %s: 0x%0x", - val_to_str(i1, slimp3_ir_codes_slimp3, "Unknown"), i1); + val_to_str_const(i1, slimp3_ir_codes_slimp3, "Unknown"), i1); } else if (tvb_get_guint8(tvb, offset+6) == 0xff && tvb_get_guint8(tvb, offset+7) == 16) { /* This is a JVC DVD player remote */ proto_tree_add_text(slimp3_tree, tvb, offset+8, 4, "Infrared Code: %s: 0x%0x", - val_to_str(i1, slimp3_ir_codes_jvc, "Unknown"), i1); + val_to_str_const(i1, slimp3_ir_codes_jvc, "Unknown"), i1); } else { /* Unknown code; just write it */ proto_tree_add_text(slimp3_tree, tvb, offset+8, 4, "Infrared Code: 0x%0x", i1); |