diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-07-18 15:17:58 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-07-18 15:41:57 +0530 |
commit | f581e9afda83549607870d0edc94e7ce5ea10d29 (patch) | |
tree | 9fc32ba5957958d07c79ecd61590cad5200e6d2f /src | |
parent | f881fe7d158287b25381a90760fd441e7dff7a65 (diff) |
queue/queue_htab_job_merge: clean up
Diffstat (limited to 'src')
-rw-r--r-- | src/queue.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/queue.c b/src/queue.c index 1496242..32e5705 100644 --- a/src/queue.c +++ b/src/queue.c @@ -138,8 +138,8 @@ static int queue_htab_job_merge(struct job **job, struct job **htab) if (jtab == NULL) { HASH_ADD_STR(*htab, drv_path, j); - for (size_t i = 0; i < (*job)->deps_filled; i++) { - ret = queue_htab_job_merge(&(*job)->deps[i], htab); + for (size_t i = 0; i < j->deps_filled; i++) { + ret = queue_htab_job_merge(&j->deps[i], htab); if (ret < 0) return ret; } @@ -151,8 +151,8 @@ static int queue_htab_job_merge(struct job **job, struct job **htab) * not merging deps */ if (jtab->name == NULL) { /* steal name from new job struct */ - jtab->name = (*job)->name; - (*job)->name = NULL; + jtab->name = j->name; + j->name = NULL; } /* only recursive calls with childrens or dependencies can enter this @@ -161,11 +161,11 @@ static int queue_htab_job_merge(struct job **job, struct job **htab) * - update parent's reference to point to jtab (done by *job = jtab) * - insert the parent to jtab */ - if ((*job)->parents_filled > 0) { - ret = job_parents_list_insert(jtab, (*job)->parents[0]); + if (j->parents_filled > 0) { + ret = job_parents_list_insert(jtab, j->parents[0]); if (ret < 0) return ret; - (*job)->parents_filled = 0; + j->parents_filled = 0; } job_free(*job); |