wrapper.c: use warning_errno()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2016-05-08 16:48:01 +07:00
committed by Junio C Hamano
parent 1c8ead97f8
commit 1da045fb9d

View File

@@ -572,7 +572,7 @@ static int warn_if_unremovable(const char *op, const char *file, int rc)
if (!rc || errno == ENOENT) if (!rc || errno == ENOENT)
return 0; return 0;
err = errno; err = errno;
warning("unable to %s %s: %s", op, file, strerror(errno)); warning_errno("unable to %s %s", op, file);
errno = err; errno = err;
return rc; return rc;
} }
@@ -608,7 +608,7 @@ int remove_or_warn(unsigned int mode, const char *file)
void warn_on_inaccessible(const char *path) void warn_on_inaccessible(const char *path)
{ {
warning(_("unable to access '%s': %s"), path, strerror(errno)); warning_errno(_("unable to access '%s'"), path);
} }
static int access_error_is_ok(int err, unsigned flag) static int access_error_is_ok(int err, unsigned flag)