X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fmicrohttpd-util.c;h=3844f7a03c5e477e514883afdcde7e33a678ac98;hb=a6278b88305b237b02eabff0d870b57fe851822d;hp=dc91b81bdec4cb219374a0437fde87d8e6629014;hpb=e64690a85772fc77ba9e825333eb1ced5a202ad1;p=elogind.git diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c index dc91b81bd..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) { - 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; }