zipl: Fix compile warning

bootmap.c: In function ‘check_secure_boot_support’:
bootmap.c:131:2: warning: ignoring return value of ‘fscanf’, declared
with attribute warn_unused_result [-Wunused-result]
  fscanf(fp, "%d", &val);
  ^~~~~~~~~~~~~~~~~~~~~~

Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jan Höppner
2019-05-20 16:35:10 +02:00
parent 73bab8e1a1
commit cf730a9632

View File

@@ -128,7 +128,10 @@ check_secure_boot_support(void)
if (!fp)
return false;
fscanf(fp, "%d", &val);
if (fscanf(fp, "%d", &val) != 1) {
fclose(fp);
return false;
}
fclose(fp);
return val ? true : false;