shada: Use os_strerror in place of strerror in some places

This commit is contained in:
ZyX
2015-07-17 17:54:44 +03:00
parent 09cbec6476
commit 9d2615df86

View File

@@ -577,7 +577,7 @@ open_file_start:
} }
if (-fd != EEXIST) { if (-fd != EEXIST) {
emsg3("System error while opening ShaDa file %s: %s", emsg3("System error while opening ShaDa file %s: %s",
fname, strerror(-fd)); fname, os_strerror(fd));
} }
return fd; return fd;
} }
@@ -2107,7 +2107,7 @@ shada_write_file_nomerge: {}
char *failed_dir; char *failed_dir;
if ((ret = os_mkdir_recurse(fname, 0700, &failed_dir)) != 0) { if ((ret = os_mkdir_recurse(fname, 0700, &failed_dir)) != 0) {
EMSG3("Failed to create directory %s for writing ShaDa file: %s", EMSG3("Failed to create directory %s for writing ShaDa file: %s",
failed_dir, strerror(-ret)); failed_dir, os_strerror(ret));
xfree(fname); xfree(fname);
xfree(failed_dir); xfree(failed_dir);
return FAIL; return FAIL;