X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fmicrohttpd-util.c;h=3844f7a03c5e477e514883afdcde7e33a678ac98;hb=40b71e89bae4e51768db4dc50ec64c1e9c96eec4;hp=382087c7906bf3daae35e2b08b97fb3651dddf54;hpb=7fd1b19bc9e9f5574f2877936b8ac267c7706947;p=elogind.git diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c index 382087c79..3844f7a03 100644 --- a/src/journal/microhttpd-util.c +++ b/src/journal/microhttpd-util.c @@ -28,10 +28,14 @@ #include "util.h" void microhttpd_logger(void *arg, const char *fmt, va_list ap) { - _cleanup_free_ char *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; }