[Devel] [PATCH 02/10] logger() gets shorter

Igor Podlesny openvz at poige.ru
Mon May 6 23:42:04 PDT 2013


---
 src/lib/logger.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/lib/logger.c b/src/lib/logger.c
index af18f26..9cf9ee9 100644
--- a/src/lib/logger.c
+++ b/src/lib/logger.c
@@ -66,14 +66,9 @@ void logger(int log_level, int err_no, const char *format, ...)
 
 	va_start(ap, format);
 	if (!g_log.quiet && g_log.verbose >= log_level) {
-		FILE *out;
+		FILE *out = (log_level < 0) ? stderr : stdout;
 		va_list ap_save;
 
-		if (log_level < 0)
-			out = stderr;
-		else
-			out = stdout;
-
 		va_copy(ap_save, ap);
 		vfprintf(out, format, ap_save);
 		va_end(ap_save);
-- 
1.7.9.5




More information about the Devel mailing list