diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-11-24 22:21:15 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-25 06:21:40 +0000 |
commit | 1c7b9492906835e81879f93fab940077aeab8dae (patch) | |
tree | a85202a77b5e9e04fa15c22e2b128676619a941f /epan/dissectors/packet-btsdp.c | |
parent | b1230ba123699549770d0015a68e43108351eb52 (diff) | |
download | wireshark-1c7b9492906835e81879f93fab940077aeab8dae.tar.gz |
Use try_val_to_str_ext() in print_uuid().
That's a much cleaner way of determining whether you found no matchin
bluetooth_uuid_vals_ext than checking whether val_to_str_ext_const()
returned the "use this if unknown" value.
It also lets us avoid a wmem_strdup().
Make print_numeric_uuid() and print_uuid() return const gchar *; there's
no reason for them *not* to be const, and that means we don't have to
throw away constness.
Change-Id: I62fb0b81c64c107dfea6c16ca8c5b9593f8f2a9d
Reviewed-on: https://code.wireshark.org/review/12126
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-btsdp.c')
-rw-r--r-- | epan/dissectors/packet-btsdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c index d9b8338506..334893d003 100644 --- a/epan/dissectors/packet-btsdp.c +++ b/epan/dissectors/packet-btsdp.c @@ -1993,7 +1993,7 @@ dissect_protocol_descriptor_list(proto_tree *next_tree, tvbuff_t *tvb, list_offset = offset; i_protocol = 1; while (list_offset - offset < size) { - gchar *uuid_str; + const gchar *uuid_str; feature_item = proto_tree_add_none_format(next_tree, hf_sdp_protocol_item, tvb, list_offset, 0, "Protocol #%u", i_protocol); feature_tree = proto_item_add_subtree(feature_item, ett_btsdp_protocol); @@ -2149,7 +2149,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint32 value; guint64 value_64; bluetooth_uuid_t uuid; - gchar *uuid_str; + const gchar *uuid_str; gint length; gint protocol_order; wmem_strbuf_t *info_buf; |