summaryrefslogtreecommitdiffstats
path: root/cross-binutils-2.23.2-xtensa-memset.patch
blob: de891ac4a97611befb4477594eeb3369f8bbf280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -ur binutils-2.23.2-old/bfd/elf32-xtensa.c binutils-2.23.2/bfd/elf32-xtensa.c
--- binutils-2.23.2-old/bfd/elf32-xtensa.c	2012-06-29 15:46:01.000000000 +0100
+++ binutils-2.23.2/bfd/elf32-xtensa.c	2013-08-09 09:06:51.271162551 +0100
@@ -6075,7 +6075,7 @@
       release_internal_relocs (sec_cache->sec, sec_cache->relocs);
       if (sec_cache->ptbl)
 	free (sec_cache->ptbl);
-      memset (sec_cache, 0, sizeof (sec_cache));
+      memset (sec_cache, 0, sizeof (*sec_cache));
     }
 }
 
@@ -6117,7 +6117,7 @@
 
   /* Fill in the new section cache.  */
   clear_section_cache (sec_cache);
-  memset (sec_cache, 0, sizeof (sec_cache));
+  memset (sec_cache, 0, sizeof (*sec_cache));
 
   sec_cache->sec = sec;
   sec_cache->contents = contents;