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>
diff --git a/layout.c b/layout.c
index e2be12e..84a8ec7 100644
--- a/layout.c
+++ b/layout.c
@@ -146,8 +146,8 @@
 
 	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] == '#') {