From 599aeceb8b89c803cba80969b364fc4e94396521 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Fri, 11 Sep 2009 03:20:34 +0000 Subject: [PATCH] * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return NULL if `ht' is NULL. --- bfd/ChangeLog | 5 +++++ bfd/elf32-bfin.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f804d9b2ad..06a2de9dc2 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 f8e4c19e72..d4e3bbb942 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; -- 2.11.0