diff --git a/c-programming/jokes/extol.c b/c-programming/jokes/extol.c index 22aa094..5074486 100644 --- a/c-programming/jokes/extol.c +++ b/c-programming/jokes/extol.c @@ -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++)