From c9b97d2a838899d00004fbfbd3f8c2e6932c89a0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Jan 2010 22:39:29 +0100 Subject: [PATCH] make sure the log functions don't modify errno --- log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/log.c b/log.c index 8d292139..ec3cab5b 100644 --- a/log.c +++ b/log.c @@ -6,6 +6,7 @@ #include #include +#include #include "log.h" @@ -18,6 +19,7 @@ void log_meta( const char *prefix, *suffix; va_list ap; + int saved_errno = errno; if (LOG_PRI(level) <= LOG_ERR) { prefix = "\x1B[1;31m"; @@ -35,4 +37,5 @@ void log_meta( va_end(ap); + errno = saved_errno; } -- 2.39.5