mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 06:23:18 +02:00
Fix selfcheck of various arrays
Stefan Reinauer has reported ridiculous NULL checks for arrays in our self_check function found by Coverity (CID1130005). This patch removes the useless checks but keeps and fixes the one responsible for the flashchips array by exporting the array size in a new constant. Corresponding to flashrom svn r1799. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
1
flash.h
1
flash.h
@ -225,6 +225,7 @@ struct flashctx {
|
||||
#define TIMING_ZERO -2
|
||||
|
||||
extern const struct flashchip flashchips[];
|
||||
extern const unsigned int flashchips_size;
|
||||
|
||||
void chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr);
|
||||
void chip_writew(const struct flashctx *flash, uint16_t val, chipaddr addr);
|
||||
|
Reference in New Issue
Block a user