aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-03-12 14:02:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-03-13 06:55:44 -0700
commit32235d90951b4b7c2976c61a28c30d82cb7a7588 (patch)
tree1d54d3e1201d424cbf41f1e0832ea58ecf662169 /bfd
parent90840a86569c32f63feb549f87507a7b6c84e070 (diff)
downloadgdb-32235d90951b4b7c2976c61a28c30d82cb7a7588.zip
gdb-32235d90951b4b7c2976c61a28c30d82cb7a7588.tar.gz
gdb-32235d90951b4b7c2976c61a28c30d82cb7a7588.tar.bz2
bfd: Don't call bfd_write with 0 size
There is no need to call bfd_write with 0 size. * elf-strtab.c (_bfd_elf_strtab_emit): Don't call bfd_write with 0 size.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf-strtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c
index 5fdfac1..b6c62f1 100644
--- a/bfd/elf-strtab.c
+++ b/bfd/elf-strtab.c
@@ -326,7 +326,7 @@ _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab)
BFD_ASSERT (tab->array[i]->refcount == 0);
len = tab->array[i]->len;
- if ((int) len < 0)
+ if ((int) len <= 0)
continue;
str = tab->array[i]->root.string;