summaryrefslogtreecommitdiffstats
path: root/flashchips.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-26 22:05:31 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-26 22:05:31 +0000
commit85c77bffc167fb32b6cff0b7ddfbb257fdb632c6 (patch)
tree4240d774ca35015fb68fb32a2f2c2b0a2ca4b1ec /flashchips.c
parent1d073f36e254e6583c2f9d1bc8f936d2bccface4 (diff)
downloadflashrom-85c77bffc167fb32b6cff0b7ddfbb257fdb632c6.zip
flashrom-85c77bffc167fb32b6cff0b7ddfbb257fdb632c6.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. 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>
Diffstat (limited to 'flashchips.c')
-rw-r--r--flashchips.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/flashchips.c b/flashchips.c
index 027b996..a082e75 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -13424,5 +13424,7 @@ const struct flashchip flashchips[] = {
.write = NULL,
},
- { NULL }
+ {0}
};
+
+const unsigned int flashchips_size = ARRAY_SIZE(flashchips);
OpenPOWER on IntegriCloud