summaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorstuge <stuge@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-01-12 21:00:35 +0000
committerstuge <stuge@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-01-12 21:00:35 +0000
commita6de8cf83dbe193bf79db46854e6d645faf2b750 (patch)
tree76d5371b6a5d6eaa6e0600a8e3d5a5cdcf98554b /layout.c
parent85adb85d9b34fa11d93b5fabf82577023a27842f (diff)
downloadflashrom-a6de8cf83dbe193bf79db46854e6d645faf2b750.tar.gz
Original v2 revision: 3857
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: https://code.coreboot.org/svn/flashrom/trunk@378 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/layout.c b/layout.c
index e2be12e..84a8ec7 100644
--- a/layout.c
+++ b/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] == '#') {