diff options
author | hwspeedy <ns@bigbear.dk> | 2024-05-24 12:36:50 +0200 |
---|---|---|
committer | hwspeedy <ns@bigbear.dk> | 2024-05-24 12:36:50 +0200 |
commit | 55e57a43e08cbe89ffdf8c8bb32cedc7bb74f388 (patch) | |
tree | 0f38220169b74d0c4dd59f1d732eb0a6bb0f0299 /modules/devices | |
parent | 4b77461f6643447a5b4cb0e133c8eaf8dd1cef72 (diff) |
FIX CodeQL errors - fscanf return value not checked correctly
Diffstat (limited to 'modules/devices')
-rw-r--r-- | modules/devices/storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/devices/storage.c b/modules/devices/storage.c index e2ba7892..ed6f533f 100644 --- a/modules/devices/storage.c +++ b/modules/devices/storage.c @@ -720,7 +720,7 @@ void __scan_ide_devices(void) if (g_file_test(device, G_FILE_TEST_EXISTS)) { proc_ide = fopen(device, "r"); if (proc_ide) { - if(!fscanf(proc_ide, "%d", &cache)) cache=0; + if(fscanf(proc_ide, "%d", &cache)!=1) cache=0; fclose(proc_ide); } else { cache = 0; |