mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 20:12:07 +00:00
fix some error messages: err() instead of errx(strerror())
This commit is contained in:
@@ -22,8 +22,7 @@ SetMapfileName(char *name)
|
||||
mf = fopen(name, "w");
|
||||
|
||||
if (mf == NULL)
|
||||
errx(EX_CANTCREAT, "Cannot open mapfile '%s' : %s", name,
|
||||
strerror(errno));
|
||||
err(EX_CANTCREAT, "Cannot open mapfile '%s'", name);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -32,8 +31,7 @@ SetSymfileName(char *name)
|
||||
sf = fopen(name, "w");
|
||||
|
||||
if (sf == NULL)
|
||||
errx(EX_CANTCREAT, "Cannot open symfile '%s' : %s", name,
|
||||
strerror(errno));
|
||||
errx(EX_CANTCREAT, "Cannot open symfile '%s'", name);
|
||||
|
||||
fprintf(sf, ";File generated by xLink v" LINK_VERSION "\n\n");
|
||||
}
|
||||
|
||||
@@ -446,8 +446,8 @@ obj_Readfile(char *tzObjectfile)
|
||||
|
||||
pObjfile = fopen(tzObjectfile, "rb");
|
||||
if (pObjfile == NULL)
|
||||
errx(EX_NOINPUT, "Unable to open object '%s' : %s",
|
||||
tzObjectfile, strerror(errno));
|
||||
err(EX_NOINPUT, "Unable to open object '%s'",
|
||||
tzObjectfile);
|
||||
obj_ReadOpenFile(pObjfile, tzObjectfile);
|
||||
fclose(pObjfile);
|
||||
|
||||
@@ -496,8 +496,7 @@ lib_Readfile(char *tzLibfile)
|
||||
|
||||
pObjfile = fopen(tzLibfile, "rb");
|
||||
if (pObjfile == NULL)
|
||||
errx(EX_NOINPUT, "Unable to open object '%s' : %s",
|
||||
tzLibfile, strerror(errno));
|
||||
err(EX_NOINPUT, "Unable to open object '%s'", tzLibfile);
|
||||
if (!pObjfile) {
|
||||
errx(5, "Unable to open '%s'", tzLibfile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user