Fix code scanning alert no. 2: Incorrect return-value check for a 'scanf'-like function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
SashaXserandCopilot Autofix powered by AI authored and bol-van committed 2024-10-28 09:32:33 +03:00
1 parent fbc5b8e491
commit 5a5d9f7f31
1 file changed
+1 -1
+1 -1
View File
@@ -1087,7 +1087,7 @@ static bool read_system_maxfiles(rlim_t *maxfile)
return false;
n=fscanf(F,"%ju",&um);
fclose(F);
if (!n) return false;
if (n != 1) return false;
*maxfile = (rlim_t)um;
return true;
#elif defined(BSD)