]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
RISC-V: Fixed riscv_update_subset1 returning wrong boolean value
authorNelson Chu <nelson@rivosinc.com>
Thu, 13 Mar 2025 02:31:34 +0000 (10:31 +0800)
committerNelson Chu <nelson@rivosinc.com>
Tue, 18 Mar 2025 04:13:48 +0000 (12:13 +0800)
The riscv_update_subset1 returning wrong boolean value if the
riscv_parse_check_conflicts isn't called, though the current return value
doesn't really useful.

bfd/elfxx-riscv.c

index fd2cb74df8081f147a880a884a3ef2c0ccb29fcf..ffcf32be69e134fe31ae28d0656fd3f2690b8d2c 100644 (file)
@@ -2524,13 +2524,13 @@ riscv_update_subset1 (riscv_parse_subset_t *rps,
     }
   while (*p++ == ',');
 
-  bool conflict = false;
+  bool no_conflict = true;
   if (explicit_subset == NULL)
     {
       riscv_parse_add_implicit_subsets (rps);
-      conflict = riscv_parse_check_conflicts (rps);
+      no_conflict = riscv_parse_check_conflicts (rps);
     }
-  return conflict;
+  return no_conflict;
 }
 
 /* Add/Remove an extension to/from the subset list.  This is used for