* elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
authorJie Zhang <jie.zhang@analog.com>
Fri, 11 Sep 2009 03:20:34 +0000 (03:20 +0000)
committerJie Zhang <jie.zhang@analog.com>
Fri, 11 Sep 2009 03:20:34 +0000 (03:20 +0000)
NULL if `ht' is NULL.

bfd/ChangeLog
bfd/elf32-bfin.c

index f804d9b2adfd7c36ceeb7753ba7597e086866cdb..06a2de9dc2d1213a710badf68e20a2d82f837259 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-04  Jie Zhang  <jie.zhang@analog.com>
+
+       * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
+       NULL if `ht' is NULL.
+
 2009-09-09  Martin Thuresson  <martin@mtme.org>
 
        Update soruces to compile cleanly with -Wc++-compat:
index f8e4c19e72b24ddbef9830cd9b560c46aed9116c..d4e3bbb94243ea53b5ba70e22ab61fbc9e3f730b 100644 (file)
@@ -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;
This page took 0.030569 seconds and 4 git commands to generate.