const char *p;
int r;
- if (!name)
- return EINVAL;
+ assert_return(name, EINVAL);
p = startswith(name, "System.Error.");
if (p) {
int r;
assert(b);
-
- if (b->is_server)
- return -EINVAL;
+ assert_return(!b->is_server, -EINVAL);
b->use_memfd = 1;
assert(b->input_fd < 0);
assert(b->output_fd < 0);
assert(b->kernel);
-
- if (b->is_server)
- return -EINVAL;
+ assert_return(!b->is_server, -EINVAL);
b->input_fd = open(b->kernel, O_RDWR|O_NOCTTY|O_CLOEXEC);
if (b->input_fd < 0)
assert(address);
assert(size);
-
- if (!bus || !bus->is_kernel)
- return -ENOTSUP;
+ assert_return(bus && bus->is_kernel, -ENOTSUP);
assert_se(pthread_mutex_lock(&bus->memfd_cache_mutex) >= 0);
size_t old_size, new_size, start;
assert(m);
-
- if (m->poisoned)
- return NULL;
+ assert_return(!m->poisoned, NULL);
old_size = sizeof(struct bus_header) + m->header->fields_size;
start = ALIGN_TO(old_size, align);
struct bus_body_part *part;
assert(m);
-
- if (m->poisoned)
- return NULL;
+ assert_return(!m->poisoned, NULL);
if (m->n_body_parts <= 0) {
part = &m->body;
assert(m);
assert(align > 0);
assert(!m->sealed);
-
- if (m->poisoned)
- return NULL;
+ assert_return(!m->poisoned, NULL);
start_body = ALIGN_TO((size_t) m->header->body_size, align);
end_body = start_body + sz;
int r;
- if (!s)
- return -EINVAL;
-
+ assert_return(s, -EINVAL);
assert(l);
if (bus_type_is_basic(*s) || *s == SD_BUS_TYPE_VARIANT) {
int r;
size_t t;
- if (!s)
- return false;
+ assert_return(s, false);
r = signature_element_length_internal(s, allow_dict_entry, 0, 0, &t);
if (r < 0)
bool signature_is_pair(const char *s) {
- if (!s)
- return false;
+ assert_return(s, false);
if (!bus_type_is_basic(*s))
return false;
const char *p;
int r;
- if (!s)
- return false;
+ assert_return(s, false);
p = s;
while (*p) {