From: Nelson Chu Date: Mon, 22 Nov 2021 11:34:45 +0000 (+0800) Subject: RISC-V: Removed the redundant NULL pointer check in the riscv_update_subset. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a58577878b19cb2e6ebbfdbff557203c344955b1;p=binutils-gdb.git RISC-V: Removed the redundant NULL pointer check in the riscv_update_subset. If we always use the .option arch to call the riscv_update_subset, then it is almost impossible that the input string will be NULL. Therefore, just remove the redundant NULL pointer check in the riscv_update_subset. bfd/ * elfxx-riscv.c (riscv_update_subset): Removed the redundant NULL pointer check. --- diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 73a99b529dc..3bd41ff2b55 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -2211,9 +2211,6 @@ riscv_update_subset (riscv_parse_subset_t *rps, { const char *p = str; - if (p == NULL) - return false; - do { int major_version = RISCV_UNKNOWN_VERSION;