mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +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);
|
ptr = fopen (name, mode);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
error (2, errno, _("cannot open file `%s'"), name);
|
error (EXIT_FAILURE, errno, _("cannot open file `%s'"), name);
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ xfclose (FILE *ptr)
|
|||||||
|
|
||||||
result = fclose (ptr);
|
result = fclose (ptr);
|
||||||
if (result == EOF)
|
if (result == EOF)
|
||||||
error (2, errno, _("cannot close file"));
|
error (EXIT_FAILURE, errno, _("cannot close file"));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user