]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/exec-util: fix logging of the args of an executed program
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Nov 2024 15:56:17 +0000 (16:56 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 27 Mar 2025 11:04:43 +0000 (12:04 +0100)
commit6bb9caa256625572eb48a728811125ad0f5c4fcc
tree1c8480339d82d62ccd82c94aae70a9ecd6f0629c
parentd193cb77c76be43e3a130a19e329093168dc4a50
shared/exec-util: fix logging of the args of an executed program

The debug logs has lots of "About to execute /some/path (null)". This
occurs when the args array is empty. Instead, only print "(null)" if
we failed with oom.

Having strv_skip() return NULL makes this pleasant to write without repeating
strv_isempty() a few times.
src/shared/exec-util.c