From c30e4ee961e72640cc55cbd500475a03308de1b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 04:22:44 +0200 Subject: Adding upstream version 252.25. Signed-off-by: Daniel Baumann --- src/shared/install.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/shared/install.c') 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. */ -- cgit v1.2.3