Skip to content

Commit 43c728e

Browse files
pcloudsgitster
authored andcommitted
unpack-trees.c: use error_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1fee1dc commit 43c728e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

unpack-trees.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,17 +1499,15 @@ static int verify_absent_1(const struct cache_entry *ce,
14991499

15001500
path = xmemdupz(ce->name, len);
15011501
if (lstat(path, &st))
1502-
ret = error("cannot stat '%s': %s", path,
1503-
strerror(errno));
1502+
ret = error_errno("cannot stat '%s'", path);
15041503
else
15051504
ret = check_ok_to_remove(path, len, DT_UNKNOWN, NULL,
15061505
&st, error_type, o);
15071506
free(path);
15081507
return ret;
15091508
} else if (lstat(ce->name, &st)) {
15101509
if (errno != ENOENT)
1511-
return error("cannot stat '%s': %s", ce->name,
1512-
strerror(errno));
1510+
return error_errno("cannot stat '%s'", ce->name);
15131511
return 0;
15141512
} else {
15151513
return check_ok_to_remove(ce->name, ce_namelen(ce),

0 commit comments

Comments
 (0)