From a58577878b19cb2e6ebbfdbff557203c344955b1 Mon Sep 17 00:00:00 2001 From: Nelson Chu Date: Mon, 22 Nov 2021 19:34:45 +0800 Subject: [PATCH] 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. --- bfd/elfxx-riscv.c | 3 --- 1 file changed, 3 deletions(-) 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; -- 2.30.2