Changeset 81c4e6ec in mainline for uspace/srv/sysman/sysman.c


Ignore:
Timestamp:
2020-07-05T20:46:27Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Parents:
a73aaec1
git-author:
Matthieu Riolo <matthieu.riolo@…> (2020-07-05 20:37:10)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2020-07-05 20:46:27)
Message:

removing adt/array and replace it with adt/list in sysman

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/sysman.c

    ra73aaec1 r81c4e6ec  
    366366        job_t *job = job_args->job;
    367367        int flags = job_args->flags;
    368         array_t job_closure;
    369         array_initialize(&job_closure, job_t *);
     368        list_t job_closure;
     369        list_initialize(&job_closure);
    370370
    371371        if (job_args->callback != NULL) {
     
    402402        job_del_ref(&job);
    403403
    404         array_foreach(job_closure, job_t *, closure_job) {
    405                 job_del_ref(&(*closure_job));
    406         }
    407         array_destroy(&job_closure);
     404        while (!list_empty(&job_closure)) {
     405                job_link_t *job_link = list_pop(&job_closure, job_link_t, link);
     406                job_del_ref(&job_link->job);
     407                free(job_link);
     408        }
    408409}
    409410
Note: See TracChangeset for help on using the changeset viewer.