From 96658be4073aaa55101b17e95c7b704a2cc7c83a Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Mon, 26 May 2014 22:05:31 +0000 Subject: 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 Acked-by: Carl-Daniel Hailfinger --- flash.h | 1 + 1 file changed, 1 insertion(+) (limited to 'flash.h') 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); -- cgit v1.1