aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2016-03-07 23:20:44 +0100
committerMichael Mann <mmann78@netscape.net>2016-03-10 13:23:59 +0000
commit7bd1158b95fa896f7bdb978dce21d4dabe173238 (patch)
treeeead5885da65e4512ec680ae73c60a7558201434 /epan/proto.c
parent3eafa0b4a64689a0889f6edb3f7d8ef19750101b (diff)
Remove double check for null (CID 1158871)
Make full use of our proper implementation of this macro by giving it the pointer as is. Change-Id: I0bbe73d19cc3f578b94ea2d4d904d6fa87b20b48 Reviewed-on: https://code.wireshark.org/review/14391 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 68a9f46c63..416b03624c 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -7974,10 +7974,7 @@ proto_check_for_protocol_or_field(const proto_tree* tree, const int id)
{
GPtrArray *ptrs = proto_get_finfo_ptr_array(tree, id);
- if (!ptrs) {
- return FALSE;
- }
- else if (g_ptr_array_len(ptrs) > 0) {
+ if (g_ptr_array_len(ptrs) > 0) {
return TRUE;
}
else {