Diff for /libelwix/src/array.c between versions 1.7 and 1.8

version 1.7, 2019/01/21 12:27:37 version 1.8, 2019/01/22 16:18:47
Line 74  array_Init(int numItems) Line 74  array_Init(int numItems)
 }  }
   
 /*  /*
    * array_Init2() - Initialize dynamic array
    *
    * @arr = Allocated array variable
    * @numItems = Number of Items
    * return: NULL error, != NULL allocated memory for array
    */
   array_t *
   array_Init2(array_t * __restrict arr, int numItems)
   {
           if (!arr)
                   return array_Init(numItems);
   
           if (array_Size(arr))
                   return NULL;    /* already allocated array! */
   
           arr->arr_last = -1;
           arr->arr_num = numItems;
           arr->arr_data = e_calloc(array_Size(arr), sizeof(intptr_t));
           if (!arr->arr_data) {
                   e_free(arr);
                   return NULL;
           } else
                   array_Zero(arr);
   
           return arr;
   }
   
   
   /*
  * array_From() - Create and fill array from array with pointers   * array_From() - Create and fill array from array with pointers
  *   *
  * @pargv = Array with pointers   * @pargv = Array with pointers

Removed from v.1.7  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>