Subject: [PATCH 17/41] compat/win32/syslog.c: use warning_errno()

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Sun, 1 May 2016 18:14:33 +0700

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 compat/win32/syslog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c
index b905aea..1c2ae18 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));
-- 
2.8.0.rc0.210.gd302cd2