From: Jie Zhang Date: Fri, 11 Sep 2009 03:20:34 +0000 (+0000) Subject: * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83fd9437924584870b50a4a9d477529dde5cf1f4;p=binutils-gdb.git * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return NULL if `ht' is NULL. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f804d9b2adf..06a2de9dc2d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-09-04 Jie Zhang + + * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return + NULL if `ht' is NULL. + 2009-09-09 Martin Thuresson Update soruces to compile cleanly with -Wc++-compat: diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index f8e4c19e72b..d4e3bbb9424 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1950,8 +1950,12 @@ bfinfdpic_relocs_info_find (struct htab *ht, const struct bfinfdpic_relocs_info *entry, enum insert_option insert) { - struct bfinfdpic_relocs_info **loc = - (struct bfinfdpic_relocs_info **) htab_find_slot (ht, entry, insert); + struct bfinfdpic_relocs_info **loc; + + if (!ht) + return NULL; + + loc = (struct bfinfdpic_relocs_info **) htab_find_slot (ht, entry, insert); if (! loc) return NULL;