Remove double check for null (CID 1158871)
authorJaap Keuter <jaap.keuter@xs4all.nl>
Mon, 7 Mar 2016 22:20:44 +0000 (23:20 +0100)
committerMichael Mann <mmann78@netscape.net>
Thu, 10 Mar 2016 13:23:59 +0000 (13:23 +0000)
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>
epan/proto.c

index 68a9f46c63b88f8cef9e346280404fa6e74e7fa0..416b03624cbc75280ade0d011ebe9e81a53df847 100644 (file)
@@ -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 {