1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-22 06:50:18 +03:00

log: check isempty for object_field and extra_field

This commit is contained in:
hanjinpeng 2025-01-15 01:10:06 +08:00 committed by Luca Boccassi
parent 2ca0f3ed2e
commit 7e91a68b2f

View File

@ -681,10 +681,10 @@ static int log_do_header(
error ? "ERRNO=" : "",
error ? 1 : 0, error,
error ? "\n" : "",
isempty(object) ? "" : object_field,
isempty(object) ? "" : ASSERT_PTR(object_field),
isempty(object) ? "" : object,
isempty(object) ? "" : "\n",
isempty(extra) ? "" : extra_field,
isempty(extra) ? "" : ASSERT_PTR(extra_field),
isempty(extra) ? "" : extra,
isempty(extra) ? "" : "\n",
program_invocation_short_name);