diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-05-18 14:04:31 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-05-18 14:04:31 +0000 |
commit | e031f88f0b91aaffa4292c634e901a3a8a4e7272 (patch) | |
tree | 27d34255bfaa4e829bd74e8c0cf7e41969240a5c /epan/dissectors/packet-x11.c | |
parent | 71114aac390ac71797deaed68267cd240199f27d (diff) |
Use val_to_str() instead of match_strval() to ensure we get a non-NULL result.
svn path=/trunk/; revision=32877
Diffstat (limited to 'epan/dissectors/packet-x11.c')
-rw-r--r-- | epan/dissectors/packet-x11.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index 7a95c6d4c8..d48be62c05 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -1185,11 +1185,10 @@ static const value_string zero_is_none_vals[] = { #define LISTofTEXTITEM8(name) { listOfTextItem(tvb, offsetp, t, hf_x11_##name, FALSE, next_offset, little_endian); } #define LISTofTEXTITEM16(name) { listOfTextItem(tvb, offsetp, t, hf_x11_##name, TRUE, next_offset, little_endian); } #define OPCODE() { \ - const gchar *enumValue = NULL; \ opcode = VALUE8(tvb, *offsetp); \ - enumValue = match_strval(opcode, state->opcode_vals); \ - proto_tree_add_uint_format(t, hf_x11_opcode, tvb, *offsetp, 1, opcode, \ - "opcode: %u (%s)", opcode, enumValue); \ + proto_tree_add_uint_format(t, hf_x11_opcode, tvb, *offsetp, \ + 1, opcode, "opcode: %u (%s)", opcode, \ + val_to_str(opcode, state->opcode_vals, "Unknown")); \ *offsetp += 1; \ } |