diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-01-22 18:21:13 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-01-22 18:25:56 +0100 |
commit | 8f5d716a71f1dfe50a2902a3ee3334b83c76d805 (patch) | |
tree | 3a9db82534961de9a7641fce814a255ce91d2a6a | |
parent | 4a4af850b3551aff9bc39e5af5ccf3b876fc50ed (diff) | |
download | systemd-8f5d716a71f1dfe50a2902a3ee3334b83c76d805.tar.gz |
shared/install: rework an assert to appease gcc-13
With the previous form, gcc is confused and thinks that .type might be unset.
Fixes #26118.
-rw-r--r-- | src/shared/install.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 4eb15ca40e..51cae3b5a2 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -342,7 +342,8 @@ 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++) { - assert(verb || changes[i].type >= 0); + if (changes[i].type < 0) + assert(verb); assert(changes[i].path); /* When making changes here, make sure to also change install_error() in dbus-manager.c. */ |