mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
(xfopen, xfclose): Use EXIT_FAILURE rathern than 2.
What was that "2" for?
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user