Nicolas Pitre nico at cam.org Allocating a 6-byte memory location with malloc() is rather silly
when this can be allocated on the stack. git-svn-id: svn://svn.berlios.de/openocd/trunk@1442 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
25047d4980
commit
9a6c3cc87f
|
@ -317,9 +317,7 @@ int nand_build_bbt(struct nand_device_s *device, int first, int last)
|
||||||
{
|
{
|
||||||
u32 page = 0x0;
|
u32 page = 0x0;
|
||||||
int i;
|
int i;
|
||||||
u8 *oob;
|
u8 oob[6];
|
||||||
|
|
||||||
oob = malloc(6);
|
|
||||||
|
|
||||||
if ((first < 0) || (first >= device->num_blocks))
|
if ((first < 0) || (first >= device->num_blocks))
|
||||||
first = 0;
|
first = 0;
|
||||||
|
|
Loading…
Reference in New Issue