summaryrefslogtreecommitdiffstats
path: root/tools
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
parent7def219b842fd32b5a4a2dd0ad2ea76fede8355d (diff)
downloadrtems-17f71fc7802c6c51679f17e76163285f31186b28.tar.bz2
tools/cpu/nios2/memory.c: Fix uninitialized use of variable memory
Updates #2405.
Diffstat (limited to 'tools')
-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");