Commit 7b07ac5f authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

logging: make sure to not change errno

Our log functions save errno and restore it. Restoring should be
at the very end of the __print_on_level() function, but
commit 6ae4a973 ("rpc: Report back first error message on failure")
messed with it.

Move errno restore at the end of the function.

travis-ci: success for Assorted nitpicks
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 4864d59e
......@@ -227,10 +227,11 @@ static void __print_on_level(unsigned int loglevel, const char *format, va_list
break;
off += ret;
}
errno = __errno;
if (loglevel == LOG_ERROR)
log_note_err(buffer + buf_off);
errno = __errno;
}
void print_on_level(unsigned int loglevel, const char *format, ...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment