]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: remove nullptr check in dwarf2_locexpr_baton_eval
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 25 Nov 2025 04:04:31 +0000 (23:04 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 1 Dec 2025 17:39:17 +0000 (12:39 -0500)
The sole caller of this function passes the address of a field, we know
it's not nullptr.

Change-Id: Ie8c609136e225667b724ebc27a395f6e615f1dea
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/loc.c

index 9ab0c70b8f72be1880154c60684221586dd5fdfa..ecda7a6cb7d89075031533bf01c0c65adffc9ef6 100644 (file)
@@ -1586,7 +1586,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton,
                           gdb::array_view<CORE_ADDR> push_values,
                           bool *is_reference)
 {
-  if (dlbaton == NULL || dlbaton->size == 0)
+  if (dlbaton->size == 0)
     return 0;
 
   dwarf2_per_objfile *per_objfile = dlbaton->per_objfile;