summaryrefslogtreecommitdiff
path: root/util/flashrom/layout.c
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2009-01-12 21:00:35 +0000
committerPeter Stuge <peter@stuge.se>2009-01-12 21:00:35 +0000
commit475ac26a9b4f14e35839f6b0df17ea9e81531b74 (patch)
tree9f684c83dd8623e6d4b8ee8d8bb6a47cece76deb /util/flashrom/layout.c
parent6ef8e0f3e3a9044aa326a62e47b71670d9a218b7 (diff)
flashrom: Check return value of fscanf()/fwrite()/fread()
Fix build error on distros with warn_unused_result attributes in glibc. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Yul Rottmann <yulrottmann@bitel.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3857 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/layout.c')
-rw-r--r--util/flashrom/layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/flashrom/layout.c b/util/flashrom/layout.c
index e2be12e9a9..84a8ec7052 100644
--- a/util/flashrom/layout.c
+++ b/util/flashrom/layout.c
@@ -146,8 +146,8 @@ int read_romlayout(char *name)
while (!feof(romlayout)) {
char *tstr1, *tstr2;
- fscanf(romlayout, "%s %s\n", tempstr,
- rom_entries[romimages].name);
+ if (2 != fscanf(romlayout, "%s %s\n", tempstr, rom_entries[romimages].name))
+ continue;
#if 0
// fscanf does not like arbitrary comments like that :( later
if (tempstr[0] == '#') {