chiark / gitweb /
logind: add a debug message in case the session already exists
[elogind.git] / src / journal / microhttpd-util.c
index dc91b81bdec4cb219374a0437fde87d8e6629014..3844f7a03c5e477e514883afdcde7e33a678ac98 100644 (file)
 #include "util.h"
 
 void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
-        char _cleanup_free_ *f;
+        _cleanup_free_ char *f = NULL;
+
         if (asprintf(&f, "microhttpd: %s", fmt) <= 0) {
                 log_oom();
                 return;
         }
+
+        DISABLE_WARNING_FORMAT_NONLITERAL;
         log_metav(LOG_INFO, NULL, 0, NULL, f, ap);
+        REENABLE_WARNING;
 }