summaryrefslogtreecommitdiffstats
path: root/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
commit1fec0f35c70bede4c9d54e3007f609611b354f1e (patch)
tree76d5371b6a5d6eaa6e0600a8e3d5a5cdcf98554b /layout.c
parent4cf3eefb84138f8b1f2578915520a4aff73dd92f (diff)
downloadast2050-flashrom-1fec0f35c70bede4c9d54e3007f609611b354f1e.zip
ast2050-flashrom-1fec0f35c70bede4c9d54e3007f609611b354f1e.tar.gz
Check return value of fscanf()/fwrite()/fread()
Fix build error on distros with warn_unused_result attributes in glibc. Corresponding to flashrom svn r378 and coreboot v2 svn r3857. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Yul Rottmann <yulrottmann@bitel.net>
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] == '#') {
OpenPOWER on IntegriCloud