]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-remote: fix error number confusion
authorLennart Poettering <lennart@amutable.com>
Mon, 2 Mar 2026 10:34:42 +0000 (11:34 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 2 Mar 2026 14:09:53 +0000 (23:09 +0900)
See: https://lists.freedesktop.org/archives/systemd-devel/2026-February/051924.html

src/journal-remote/microhttpd-util.c

index e69f32f7ab53628cb827ef0a922cf481475d82de..73b6ed4c9466c4949fe3ba527229aa6fe61fed69 100644 (file)
@@ -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);