]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: Remove redundant null check
authorAleksandar Rikalo <arikalo@gmail.com>
Fri, 20 Jun 2025 06:58:55 +0000 (08:58 +0200)
committerPedro Alves <pedro@palves.net>
Fri, 20 Jun 2025 18:29:40 +0000 (19:29 +0100)
This patch simplifies the code at two points by removing redundant
null checks.  There is no functional impact.

Reviewed-By: Keith Seitz <keiths@redhat.com>
Approved-By: Pedro Alves <pedro@palves.net>
Change-Id: I76e1c7fad00e8fcb24ced7bfd75d19cdd6266c32

gdb/gnu-v2-abi.c

index ab9f53b52338d99e41bbff9c5a981f765acb13ae..94efa7098a4f3816c533b5b26186d54e937f5ca2 100644 (file)
@@ -265,15 +265,9 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
       if (top && ((*top) >0))
        {
          if (rtti_type->length () > known_type->length ())
-           {
-             if (full)
-               *full=0;
-           }
+           *full = 0;
          else
-           {
-             if (full)
-               *full=1;
-           }
+           *full = 1;
        }
     }
   else