summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 16:47:37 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-05-09 12:29:08 -0700
commitdf8e31391da9ec97f907bec32a648da6145f4b08 (patch)
treecb1fcad240e6516ba5ff3d4020e6fba608c5e367 /compat
parentcombine-diff.c: use error_errno() (diff)
downloadtgif-df8e31391da9ec97f907bec32a648da6145f4b08.tar.xz
compat/win32/syslog.c: use warning_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/win32/syslog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c
index b905aea31b..6c7c9b6053 100644
--- a/compat/win32/syslog.c
+++ b/compat/win32/syslog.c
@@ -28,13 +28,13 @@ void syslog(int priority, const char *fmt, ...)
va_end(ap);
if (str_len < 0) {
- warning("vsnprintf failed: '%s'", strerror(errno));
+ warning_errno("vsnprintf failed");
return;
}
str = malloc(st_add(str_len, 1));
if (!str) {
- warning("malloc failed: '%s'", strerror(errno));
+ warning_errno("malloc failed");
return;
}
@@ -45,7 +45,7 @@ void syslog(int priority, const char *fmt, ...)
while ((pos = strstr(str, "%1")) != NULL) {
str = realloc(str, st_add(++str_len, 1));
if (!str) {
- warning("realloc failed: '%s'", strerror(errno));
+ warning_errno("realloc failed");
return;
}
memmove(pos + 2, pos + 1, strlen(pos));