(xfopen, xfclose): Use EXIT_FAILURE rathern than 2.

What was that "2" for?
This commit is contained in:
Paul Eggert
2002-10-22 05:01:46 +00:00
parent 0ae6073a18
commit 901ec1537a

View File

@@ -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;
}