summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-24 13:24:49 -0800
committerJunio C Hamano <gitster@pobox.com>2010-11-24 13:24:49 -0800
commitc6caede7fd6bc428b4d2e53f6bb5c1e1a9bcb24c (patch)
tree47c0591c521e0d369b0d284298104c8d8377c954 /compat
parent89ba4e7c7f71712133d1d3137f811b99ea43dd31 (diff)
parent16529f2e5630d3d155e4dff0ebd3c7c5daa882f9 (diff)
downloadgit-c6caede7fd6bc428b4d2e53f6bb5c1e1a9bcb24c.tar.gz
Merge branch 'maint'
* maint: imap-send: link against libcrypto for HMAC and others git-send-email.perl: Deduplicate "to:" and "cc:" entries with names mingw: do not set errno to 0 on success
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 29f403649f..fdbf093f6e 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -198,9 +198,10 @@ static inline time_t filetime_to_time_t(const FILETIME *ft)
*/
static int do_lstat(int follow, const char *file_name, struct stat *buf)
{
+ int err;
WIN32_FILE_ATTRIBUTE_DATA fdata;
- if (!(errno = get_file_attr(file_name, &fdata))) {
+ if (!(err = get_file_attr(file_name, &fdata))) {
buf->st_ino = 0;
buf->st_gid = 0;
buf->st_uid = 0;
@@ -233,6 +234,7 @@ static int do_lstat(int follow, const char *file_name, struct stat *buf)
}
return 0;
}
+ errno = err;
return -1;
}