9
0
Fork 0

mtest: remove braindamaged NULL pointer deref

The alternative memory test implementation needs a scratch
memory location to remove the last data from the data bus.
Instead of using a NULL pointer for this, default to the
memory start address.
No sane program should consider a NULL pointer as a safe default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-01-13 13:02:29 +01:00
parent 1a3c1d3de1
commit a7acf2e746
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ static int mem_test(ulong _start, ulong _end, ulong pattern_unused)
#ifdef CFG_MEMTEST_SCRATCH
vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH;
#else
vu_long *dummy = 0; /* yes, this is address 0x0, not NULL */
vu_long *dummy = start;
#endif
int j;
int iterations = 1;