diff options
author | Evan Huus <eapache@gmail.com> | 2013-09-20 14:41:22 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-09-20 14:41:22 +0000 |
commit | 4212b20048ff787c37b09cdba83382bac764be70 (patch) | |
tree | ee10b4a4494ab4abcd7d46e04d793be3c8060c60 /epan/dissectors/packet-dhcpv6.c | |
parent | f3e76b0953420e40a2fc70a73d42b8082c139efe (diff) |
Don't use g_strv_length on a single string, just use strlen. Also do the
null-check *before* calling strlen (if it's even necessary?)
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9166
svn path=/trunk/; revision=52156
Diffstat (limited to 'epan/dissectors/packet-dhcpv6.c')
-rw-r--r-- | epan/dissectors/packet-dhcpv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index e1d61e895b..b0927f9739 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -1101,7 +1101,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i device_type = tvb_get_ephemeral_string(tvb, sub_off, field_len); - if (g_strv_length(&device_type) == 0 || device_type == NULL) { + if (device_type == NULL || strlen(device_type) == 0) { proto_item_append_text(ti, "Packet does not contain Device Type."); } else { proto_item_append_text(ti, "\"%s\"", device_type); |