[PATCH v3 12/41] builtin/update-index.c: prefer "err" to "errno" in process_lstat_error
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- May 8, 2016, 09:47 UTC
- Message-ID
- <1462700881-25108-13-git-send-email-pclouds@gmail.com>
- In-Reply-To
- <1462700881-25108-1-git-send-email-pclouds@gmail.com>
"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> --- builtin/update-index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/update-index.c b/builtin/update-index.c index 1c94ca5..b8b8522 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -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)
-- 2.8.0.rc0.210.gd302cd2