reachable.c: use error_errno()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 8 May 2016 09:47:51 +0000 (16:47 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000 (12:29 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reachable.c
index ed352018964ef2260f5da51239800bbcc816ad1b..d0199cace4aa0ab22a46fdb5ac2777c4e7e6153b 100644 (file)
@@ -119,8 +119,7 @@ static int add_recent_loose(const unsigned char *sha1,
                 */
                if (errno == ENOENT)
                        return 0;
-               return error("unable to stat %s: %s",
-                            sha1_to_hex(sha1), strerror(errno));
+               return error_errno("unable to stat %s", sha1_to_hex(sha1));
        }
 
        add_recent_object(sha1, st.st_mtime, data);