ucx/dlist.c

changeset 73
f15c7d6aebb9
parent 69
fb59270b1de3
child 87
bd444539cced
     1.1 --- a/ucx/dlist.c	Fri Oct 12 12:09:00 2012 +0200
     1.2 +++ b/ucx/dlist.c	Fri Oct 12 12:12:59 2012 +0200
     1.3 @@ -117,7 +117,8 @@
     1.4  UcxDlist *ucx_dlist_sort_merge(int length,
     1.5          UcxDlist* restrict ls, UcxDlist* restrict le, UcxDlist* restrict re,
     1.6          cmp_func fnc, void* data) {
     1.7 -    ucx_dynarray_new(UcxDlist*, sorted, length);
     1.8 +
     1.9 +    UcxDlist** sorted = (UcxDlist**) malloc(sizeof(UcxDlist*)*length);
    1.10      UcxDlist *rc, *lc;
    1.11  
    1.12      lc = ls; rc = le;
    1.13 @@ -152,7 +153,7 @@
    1.14      sorted[length-1]->next = NULL;
    1.15  
    1.16      UcxDlist *ret = sorted[0];
    1.17 -    ucx_dynarray_free(sorted);
    1.18 +    free(sorted);
    1.19      return ret;
    1.20  }
    1.21  

mercurial