[CRIU] [PATCH 2/4] zdtm: Don't modify global @errno in test_msg
Cyrill Gorcunov
gorcunov at openvz.org
Thu Mar 26 01:23:13 PDT 2015
This is logging routine, lets it not affect the global @errno.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
test/zdtm/lib/msg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/zdtm/lib/msg.c b/test/zdtm/lib/msg.c
index 8a80ae2244c0..48ddd43e0906 100644
--- a/test/zdtm/lib/msg.c
+++ b/test/zdtm/lib/msg.c
@@ -39,6 +39,7 @@ void test_msg(const char *format, ...)
va_list arg;
int off = 0;
char buf[PAGE_SIZE];
+ int __errno = errno;
struct timeval tv;
struct tm *tm;
@@ -57,4 +58,5 @@ void test_msg(const char *format, ...)
va_end(arg);
fprintf(stderr, "%s", buf);
+ errno = __errno;
}
--
1.9.3
More information about the CRIU
mailing list