From: Aleksandar Rikalo Date: Fri, 20 Jun 2025 06:58:55 +0000 (+0200) Subject: gdb: Remove redundant null check X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=404285eda06bef2532f2f219eed50ef03f5b608c;p=thirdparty%2Fbinutils-gdb.git gdb: Remove redundant null check This patch simplifies the code at two points by removing redundant null checks. There is no functional impact. Reviewed-By: Keith Seitz Approved-By: Pedro Alves Change-Id: I76e1c7fad00e8fcb24ced7bfd75d19cdd6266c32 --- diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index ab9f53b5233..94efa7098a4 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -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