tree-wide: add missing assertions

Found by coccinelle.
This commit is contained in:
Yu Watanabe
2026-08-18 06:30:10 +09:00
parent 05f790da8f
commit 90481c0b1b
40 changed files with 171 additions and 37 deletions
+6
View File
@@ -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;