diff options
author | visa <visa@openbsd.org> | 2020-07-31 14:27:30 +0000 |
---|---|---|
committer | visa <visa@openbsd.org> | 2020-07-31 14:27:30 +0000 |
commit | 78bc84a50eff73835ae5206b6d1ffc40ad1c77e9 (patch) | |
tree | 7fd123fcd96fb80ed60a9c501e114ea298716cd4 /gnu | |
parent | Make sure bcmtmon(4) attaches even if it has a "syscon" compatible. (diff) | |
download | wireguard-openbsd-78bc84a50eff73835ae5206b6d1ffc40ad1c77e9.tar.xz wireguard-openbsd-78bc84a50eff73835ae5206b6d1ffc40ad1c77e9.zip |
Use consistent types in comparison to fix build with clang 10.
Instead of just checking if *namep is NULL, also check if the string
pointed by *namep is empty. This is probably the original intent of
the code.
OK kettenis@ jsg@ deraadt@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/bfd/elfxx-mips.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c index 2f9d4a83eee..708bdada3b3 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c +++ b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c @@ -3951,7 +3951,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, *namep = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name); - if (*namep == '\0') + if (*namep == NULL || **namep == '\0') *namep = bfd_section_name (input_bfd, sec); target_is_16_bit_code_p = (sym->st_other == STO_MIPS16); diff --git a/gnu/usr.bin/binutils/bfd/elfxx-mips.c b/gnu/usr.bin/binutils/bfd/elfxx-mips.c index 5be26072a8b..8dffd67c94b 100644 --- a/gnu/usr.bin/binutils/bfd/elfxx-mips.c +++ b/gnu/usr.bin/binutils/bfd/elfxx-mips.c @@ -3092,7 +3092,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, *namep = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name); - if (*namep == '\0') + if (*namep == NULL || **namep == '\0') *namep = bfd_section_name (input_bfd, sec); target_is_16_bit_code_p = (sym->st_other == STO_MIPS16); |