]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/update-index.c: prefer "err" to "errno" in process_lstat_error
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 8 May 2016 09:47:32 +0000 (16:47 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000 (12:29 -0700)
"errno" is already passed in as "err". Here we should use err instead of
errno. errno is probably a copy/paste mistake in e011054 (Teach
git-update-index about gitlinks - 2007-04-12)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c

index 1c94ca59bfcd756c94d86ef46592528e8fbfdcb1..b8b8522249337703eb66b245ad263e7dc1b41582 100644 (file)
@@ -255,7 +255,7 @@ static int process_lstat_error(const char *path, int err)
 {
        if (err == ENOENT || err == ENOTDIR)
                return remove_one_path(path);
-       return error("lstat(\"%s\"): %s", path, strerror(errno));
+       return error("lstat(\"%s\"): %s", path, strerror(err));
 }
 
 static int add_one_path(const struct cache_entry *old, const char *path, int len, struct stat *st)