mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-12-27 05:40:17 +05:30
extol.c: add error checking for fopen
This commit is contained in:
parent
988389a6ea
commit
4ae64ebf95
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user