summaryrefslogtreecommitdiff
path: root/flash.h
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-05-26 22:05:31 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-05-26 22:05:31 +0000
commit034f719ab77b222f130f564f63b948982ce95dd0 (patch)
tree4240d774ca35015fb68fb32a2f2c2b0a2ca4b1ec /flash.h
parentcfc7fc504858b4d32b6c0445e9ab94a676bfa970 (diff)
downloadflashrom-034f719ab77b222f130f564f63b948982ce95dd0.tar.gz
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. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1799 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index d0b4fd9..cf496b6 100644
--- a/flash.h
+++ b/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);