1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-12-26 11:30:03 +05:30

extol.c: add error checking for fopen

This commit is contained in:
Intel A80486DX2-66 2024-03-09 12:09:57 +03:00
parent 988389a6ea
commit 4ae64ebf95
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -31,7 +31,12 @@ extol (FILE *f)
if (f == NULL)
{
FILE *fs = fopen ("extol.txt", "a+");
FILE *fs = fopen (EXTOL_FILE_NAME, "a+");
if (fs == NULL)
{
perror ("fopen");
exit (EXIT_FAILURE);
}
fseek (fs, 0L, SEEK_END);
result = extol (fs);
for (result <<= 4, result &= ~15; (result & 15) != 15; result++)