src/list.c

branch
feature/array
changeset 335
872ae61c8945
parent 323
b8c49e7a1dba
child 371
365b24f20f98
     1.1 --- a/src/list.c	Thu Jul 04 20:07:31 2019 +0200
     1.2 +++ b/src/list.c	Thu Jul 04 21:31:45 2019 +0200
     1.3 @@ -206,7 +206,7 @@
     1.4      return s;
     1.5  }
     1.6  
     1.7 -static UcxList *ucx_list_sort_merge(int length,
     1.8 +static UcxList *ucx_list_sort_merge(size_t length,
     1.9          UcxList* ls, UcxList* le, UcxList* re,
    1.10          cmp_func fnc, void* data) {
    1.11  
    1.12 @@ -214,7 +214,7 @@
    1.13      UcxList *rc, *lc;
    1.14  
    1.15      lc = ls; rc = le;
    1.16 -    int n = 0;
    1.17 +    size_t n = 0;
    1.18      while (lc && lc != le && rc != re) {
    1.19          if (fnc(lc->data, rc->data, data) <= 0) {
    1.20              sorted[n] = lc;
    1.21 @@ -255,7 +255,7 @@
    1.22      }
    1.23  
    1.24      UcxList *lc;
    1.25 -    int ln = 1;
    1.26 +    size_t ln = 1;
    1.27  
    1.28      UcxList *ls = l, *le, *re;
    1.29      
    1.30 @@ -271,7 +271,7 @@
    1.31          return l; // this list is already sorted :)
    1.32      } else {
    1.33          UcxList *rc;
    1.34 -        int rn = 1;
    1.35 +        size_t rn = 1;
    1.36          rc = le;
    1.37          // skip already sorted elements
    1.38          while (rc->next != NULL && fnc(rc->next->data, rc->data, data) > 0) {

mercurial