summaryrefslogtreecommitdiffstats
path: root/tools/cpu/nios2
diff options
context:
space:
mode:
authorMartin Galvan <martin.galvan@tallertechnologies.com>2015-09-02 16:54:22 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2015-09-03 11:28:06 -0500
commit17f71fc7802c6c51679f17e76163285f31186b28 (patch)
treea5a41a7797256c6b72e1d43e5fc150d39a6747bb /tools/cpu/nios2
parentvarious .h files: Add missing C++ extern wrappers (diff)
downloadrtems-17f71fc7802c6c51679f17e76163285f31186b28.tar.bz2
tools/cpu/nios2/memory.c: Fix uninitialized use of variable memory
Updates #2405.
Diffstat (limited to 'tools/cpu/nios2')
-rw-r--r--tools/cpu/nios2/memory.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/cpu/nios2/memory.c b/tools/cpu/nios2/memory.c
index cd88b8b7cf..cb1ea7f31e 100644
--- a/tools/cpu/nios2/memory.c
+++ b/tools/cpu/nios2/memory.c
@@ -18,7 +18,8 @@ memory_desc *find_memory(device_desc *devices)
{
struct ptf *p;
struct ptf_item pi;
- memory_desc *tmd, *memory;
+ memory_desc *tmd;
+ memory_desc *memory = NULL;
/********************************************************/
/* Check which of the devices are memory, sort by size */
@@ -29,8 +30,6 @@ memory_desc *find_memory(device_desc *devices)
struct ptf_item pi;
device_desc *dd;
- memory = NULL;
-
for(dd = devices; dd; dd=dd->next)
{
p = ptf_find(dd->ptf->sub, &pi, item, "Is_Memory_Device", "1");