summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-bus/bus-error.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:19:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:19:38 +0000
commit68aafb2658b298c23ed1725b69f5474bee5ee38c (patch)
treec383770976489dbeeef85ef7bc668da64a242b14 /src/libsystemd/sd-bus/bus-error.c
parentAdding upstream version 252.23. (diff)
downloadsystemd-68aafb2658b298c23ed1725b69f5474bee5ee38c.tar.xz
systemd-68aafb2658b298c23ed1725b69f5474bee5ee38c.zip
Adding upstream version 252.25.upstream/252.25
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libsystemd/sd-bus/bus-error.c')
-rw-r--r--src/libsystemd/sd-bus/bus-error.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
index 4d687cf..cfcdb2c 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -278,14 +278,16 @@ _public_ int sd_bus_error_setf(sd_bus_error *e, const char *name, const char *fo
va_start(ap, format);
r = sd_bus_error_setfv(e, name, format, ap);
- assert(!name || r < 0);
+ if (name)
+ assert(r < 0);
va_end(ap);
return r;
}
r = sd_bus_error_set(e, name, NULL);
- assert(!name || r < 0);
+ if (name)
+ assert(r < 0);
return r;
}