log: make log_syntax() assign correct errno and show valid error cause

This commit is contained in:
Yu Watanabe
2019-03-04 15:18:06 +09:00
parent 892cd2f7ac
commit ee96382fdb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1223,7 +1223,7 @@ int log_syntax_internal(
log_target == LOG_TARGET_NULL)
return -ERRNO_VALUE(error);
errno = error;
errno = ERRNO_VALUE(error);
va_start(ap, format);
(void) vsnprintf(buffer, sizeof buffer, format, ap);