From: <oh...@ma...> - 2009-04-02 23:20:37
|
Author: oharboe Date: 2009-04-02 23:20:35 +0200 (Thu, 02 Apr 2009) New Revision: 1442 Modified: trunk/src/flash/nand.c Log: 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. Modified: trunk/src/flash/nand.c =================================================================== --- trunk/src/flash/nand.c 2009-04-02 21:17:27 UTC (rev 1441) +++ trunk/src/flash/nand.c 2009-04-02 21:20:35 UTC (rev 1442) @@ -317,10 +317,8 @@ { u32 page = 0x0; int i; - u8 *oob; + u8 oob[6]; - oob = malloc(6); - if ((first < 0) || (first >= device->num_blocks)) first = 0; |