summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/bus-internal.h')
-rw-r--r--src/libsystemd/sd-bus/bus-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
index d420a7594f..9b68fdd642 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
@@ -419,3 +419,9 @@ int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
bool is_kdbus_wanted(void);
bool is_kdbus_available(void);
+
+#define bus_assert_return(expr, r, error) \
+ do { \
+ if (!assert_log(expr)) \
+ return sd_bus_error_set_errno(error, r); \
+ } while (false)