diff options
author | hanjinpeng <hanjinpeng@kylinos.cn> | 2025-01-14 18:10:06 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2025-01-15 23:36:58 +0100 |
commit | 7e91a68b2f2162aba0253e5c27cf4711d104d119 (patch) | |
tree | 92403224665a949845c8aa6d22b06c4a7818d869 | |
parent | pty_open_peer() follow-up (#36027) (diff) | |
download | systemd-7e91a68b2f2162aba0253e5c27cf4711d104d119.tar.xz systemd-7e91a68b2f2162aba0253e5c27cf4711d104d119.zip |
log: check isempty for object_field and extra_field
-rw-r--r-- | src/basic/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/log.c b/src/basic/log.c index 9f09b0cea5..cbc6edc95d 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -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); |