]> git.ipfire.org Git - thirdparty/systemd.git/commit
macro: flip ONCE macro to make log_once() and friend actually log once
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Sep 2025 23:39:17 +0000 (08:39 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Oct 2025 08:31:43 +0000 (10:31 +0200)
commitd21fa647d204f9d7275a5370580e9211ffe14aec
tree8ef6435888027be56d9828ef42b59b81875b2567
parentc32062c5334bc23f9eeb42233509d05545fc1db4
macro: flip ONCE macro to make log_once() and friend actually log once

Previously, ONCE is false for the first time, and true for later times,
hence log_once() and log_once_errno() suppress logging in the first call,
rather than later calls.

Fortunately, ONCE macro is only used in log_once() and log_once_errno(),
hence this only fixes spurious logging.

(cherry picked from commit acd33c5df8ba35bcfa595ea0be9f74afa6aab289)
src/fundamental/macro-fundamental.h
src/test/test-log.c
src/test/test-macro.c