1
0
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:
Stefan Tauner
2014-05-26 22:05:31 +00:00
parent 6455dff07b
commit 96658be407
3 changed files with 28 additions and 34 deletions

View File

@ -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);