1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

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>
This commit is contained in:
Peter Stuge
2009-01-12 21:00:35 +00:00
parent 4cf3eefb84
commit 1fec0f35c7
2 changed files with 15 additions and 9 deletions

View File

@ -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] == '#') {