diff options
Diffstat (limited to 'src/libsystemd/sd-bus/bus-internal.h')
-rw-r--r-- | src/libsystemd/sd-bus/bus-internal.h | 6 |
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 c3e20ee1bf..e399701beb 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -393,3 +393,9 @@ int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_ha int bus_get_root_path(sd_bus *bus); int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error); + +#define bus_assert_return(expr, r, error) \ + do { \ + if (!assert_log(expr, #expr)) \ + return sd_bus_error_set_errno(error, r); \ + } while (false) |