From 8b3d3d6d6768d4330d7b567d2be5d2be76d94122 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 2 Mar 2026 11:34:42 +0100 Subject: [PATCH] journal-remote: fix error number confusion See: https://lists.freedesktop.org/archives/systemd-devel/2026-February/051924.html --- src/journal-remote/microhttpd-util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c index e69f32f7ab..73b6ed4c94 100644 --- a/src/journal-remote/microhttpd-util.c +++ b/src/journal-remote/microhttpd-util.c @@ -68,9 +68,7 @@ int mhd_respondf_internal( assert(connection); assert(format); - if (error < 0) - error = -error; - errno = -error; + errno = ERRNO_VALUE(error); va_start(ap, format); r = vasprintf(&m, format, ap); va_end(ap);