mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-11-08 08:23:24 +00:00
(xfopen, xfclose): Use EXIT_FAILURE rathern than 2.
What was that "2" for?
This commit is contained in:
1 parent
0ae6073a18
commit
901ec1537a
1 file changed
+2
-2
+2
-2
@@ -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