return r;
}
- *ret = controllers;
- controllers = NULL;
+ *ret = TAKE_PTR(controllers);
return 0;
}
if (ret) {
buffer[n] = 0;
- *ret = buffer;
- buffer = NULL;
+ *ret = TAKE_PTR(buffer);
}
return (int) count;
*z = 0;
- *mem = r;
- r = NULL;
+ *mem = TAKE_PTR(r);
*len = (l + 1) / 2;
return 0;
*z = 0;
- *mem = r;
- r = NULL;
+ *mem = TAKE_PTR(r);
*_len = len;
return 0;
if (ret_size)
*ret_size = (size_t) (z - buf);
- *ret = buf;
- buf = NULL;
+ *ret = TAKE_PTR(buf);
return 0;
}
if (copy->fd < 0)
return -errno;
- *ret = copy;
- copy = NULL;
+ *ret = TAKE_PTR(copy);
return 0;
}
strv_sort(l);
- *ret = l;
- l = NULL;
+ *ret = TAKE_PTR(l);
return 0;
}
if ((socklen_t) (int) n != n)
return -E2BIG;
- *ret = d;
- d = NULL;
+ *ret = TAKE_PTR(d);
return (int) n;
}
} else if (errno != ENOENT)
return -errno;
- *ret = zones;
- zones = NULL;
+ *ret = TAKE_PTR(zones);
return 0;
}
if (r < 0)
return r;
- *activatable = y;
- y = NULL;
+ *activatable = TAKE_PTR(y);
}
- if (acquired) {
- *acquired = x;
- x = NULL;
- }
+ if (acquired)
+ *acquired = TAKE_PTR(x);
return 0;
}
return r;
}
- if (creds) {
- *creds = c;
- c = NULL;
- }
+ if (creds)
+ *creds = TAKE_PTR(c);
return 0;
}
if (r < 0)
return r;
- *ret = c;
- c = NULL;
+ *ret = TAKE_PTR(c);
+
return 0;
}
if (r < 0)
return r;
- *ret = n;
- n = NULL;
+ *ret = TAKE_PTR(n);
+
return 0;
}
}
components[n_components].type = t;
- components[n_components].value_str = value;
+ components[n_components].value_str = TAKE_PTR(value);
components[n_components].value_u8 = u;
n_components++;
- value = NULL;
if (q[quoted] == 0)
break;
}
m->bus = sd_bus_ref(bus);
- *ret = m;
- m = NULL;
+ *ret = TAKE_PTR(m);
return 0;
}
return r;
sd_bus_message_unref(*m);
- *m = n;
- n = NULL;
+ *m = TAKE_PTR(n);
return 0;
}
/* Insert at the very front */
memmove(bus->rqueue + 1, bus->rqueue, sizeof(sd_bus_message*) * bus->rqueue_size);
- bus->rqueue[0] = m;
- m = NULL;
+ bus->rqueue[0] = TAKE_PTR(m);
bus->rqueue_size++;
return 0;
if (r < 0)
return r;
- *ret = m;
- m = NULL;
+ *ret = TAKE_PTR(m);
+
return 1;
}
bus->exit_triggered = true;
(void) bus_exit_now(bus);
- if (ret) {
- *ret = m;
- m = NULL;
- }
+ if (ret)
+ *ret = TAKE_PTR(m);
r = 1;
r = strv_length(a);
- if (sessions) {
- *sessions = a;
- a = NULL;
- }
+ if (sessions)
+ *sessions = TAKE_PTR(a);
- if (uids) {
- *uids = b;
- b = NULL;
- }
+ if (uids)
+ *uids = TAKE_PTR(b);
if (n_uids)
*n_uids = n;
r++;
}
- if (users) {
- *users = l;
- l = NULL;
- }
+ if (users)
+ *users = TAKE_PTR(l);
return r;
}
}
}
- *nodes = l;
- l = NULL;
+ *nodes = TAKE_PTR(l);
return 1;
}
}
}
- *nodes = l;
- l = NULL;
+ *nodes = TAKE_PTR(l);
return 1;
}
}
}
- *nodes = l;
- l = NULL;
+ *nodes = TAKE_PTR(l);
return 1;
}
if (r < 0)
return r;
- *out = u;
- u = NULL;
+ *out = TAKE_PTR(u);
+
return 0;
}
r = acl_get_entry(acl, ACL_NEXT_ENTRY, &entry);
}
- if (ret_groups) {
- *ret_groups = g;
- g = NULL;
- }
+ if (ret_groups)
+ *ret_groups = TAKE_PTR(g);
return ret;
}
}
}
- *acl_access = a_acl;
- *acl_default = d_acl;
- a_acl = d_acl = NULL;
+ *acl_access = TAKE_PTR(a_acl);
+ *acl_default = TAKE_PTR(d_acl);
return 0;
}
if (r < 0)
return -errno;
- *acl = old;
- old = NULL;
+ *acl = TAKE_PTR(old);
+
return 0;
}
if (r < 0)
return r;
- *_bus = bus;
- bus = NULL;
+ *_bus = TAKE_PTR(bus);
return 0;
}
if (r < 0)
return r;
- *_bus = bus;
- bus = NULL;
+ *_bus = TAKE_PTR(bus);
return 0;
}
if (r < 0)
return r;
- *ret = bus;
- bus = NULL;
+ *ret = TAKE_PTR(bus);
return 0;
}
if (r < 0)
return r;
- *ret = bus;
- bus = NULL;
+ *ret = TAKE_PTR(bus);
return 0;
}
}
strv_free_free(*ret);
- *ret = controllers;
- controllers = NULL;
+ *ret = TAKE_PTR(controllers);
return 0;
}