diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:22:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:22:46 +0000 |
commit | df66ab078d7415dcd983ff92d225098db2c7244a (patch) | |
tree | b8c6ffe2ccf913c52d04e69d9c2d62181f738ed4 /src/shared/install.c | |
parent | Releasing progress-linux version 252.23-1~deb12u1~progress6.99u1. (diff) | |
download | systemd-df66ab078d7415dcd983ff92d225098db2c7244a.tar.xz systemd-df66ab078d7415dcd983ff92d225098db2c7244a.zip |
Merging upstream version 252.25.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/install.c')
-rw-r--r-- | src/shared/install.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 84d29dc..af3e8a3 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -342,9 +342,12 @@ void install_changes_dump(int r, const char *verb, const InstallChange *changes, assert(verb || r >= 0); for (size_t i = 0; i < n_changes; i++) { - if (changes[i].type < 0) - assert(verb); assert(changes[i].path); + /* This tries to tell the compiler that it's safe to use 'verb' in a string format if there + * was an error, but the compiler doesn't care and fails anyway, so strna(verb) is used + * too. */ + assert(verb || changes[i].type >= 0); + verb = strna(verb); /* When making changes here, make sure to also change install_error() in dbus-manager.c. */ |