Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
compat/win32/syslog.c: use warning_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:37 +0000
(16:47 +0700)
committer
Junio 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>
compat/win32/syslog.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
4b94ec9
)
diff --git
a/compat/win32/syslog.c
b/compat/win32/syslog.c
index b905aea31bf53dc0f614d5e95c0dbd382818cbc4..6c7c9b60538d932d6dbc2d32774a6f64f8687c69 100644
(file)
--- 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) {
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) {
return;
}
str = malloc(st_add(str_len, 1));
if (!str) {
- warning
("malloc failed: '%s'", strerror(errno)
);
+ warning
_errno("malloc failed"
);
return;
}
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) {
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));
return;
}
memmove(pos + 2, pos + 1, strlen(pos));