From: Paul Eggert Date: Tue, 22 Oct 2002 05:01:46 +0000 (+0000) Subject: (xfopen, xfclose): Use EXIT_FAILURE rathern than 2. X-Git-Tag: BISON-1_875~405 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/901ec1537a0ceb980398a5395751ea0e445c4ce5 (xfopen, xfclose): Use EXIT_FAILURE rathern than 2. What was that "2" for? --- diff --git a/src/files.c b/src/files.c index dd3ec818..92573585 100644 --- a/src/files.c +++ b/src/files.c @@ -111,7 +111,7 @@ xfopen (const char *name, const char *mode) ptr = fopen (name, mode); if (!ptr) - error (2, errno, _("cannot open file `%s'"), name); + error (EXIT_FAILURE, errno, _("cannot open file `%s'"), name); return ptr; } @@ -130,7 +130,7 @@ xfclose (FILE *ptr) result = fclose (ptr); if (result == EOF) - error (2, errno, _("cannot close file")); + error (EXIT_FAILURE, errno, _("cannot close file")); return result; }