tree-wide: add missing assertions
Found by coccinelle.
This commit is contained in:
@@ -666,6 +666,8 @@ static int job_node_enumerator(
|
||||
Job *j;
|
||||
unsigned k = 0;
|
||||
|
||||
assert(nodes);
|
||||
|
||||
l = new0(char*, hashmap_size(m->jobs) + 1);
|
||||
if (!l)
|
||||
return -ENOMEM;
|
||||
@@ -759,6 +761,8 @@ static int sysupdate_run_simple(sd_json_variant **ret, Target *t, ...) {
|
||||
_cleanup_free_ char *target_arg = NULL;
|
||||
int r;
|
||||
|
||||
assert(ret);
|
||||
|
||||
if (t) {
|
||||
r = target_get_argument(t, &target_arg);
|
||||
if (r < 0)
|
||||
@@ -1617,6 +1621,8 @@ static int target_node_enumerator(
|
||||
unsigned k = 0;
|
||||
int r;
|
||||
|
||||
assert(nodes);
|
||||
|
||||
r = manager_ensure_targets(m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user