]> 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)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 17 Sep 2025 19:50:19 +0000 (21:50 +0200)
commitacd33c5df8ba35bcfa595ea0be9f74afa6aab289
tree41284197d27b91074af0035ce7cb8e98a41fe244
parent444af9538f465f893c4d6bb5b4a7fad6c17b15a6
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.
src/fundamental/macro-fundamental.h
src/test/test-log.c
src/test/test-macro.c