mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user