Fri, 26 Jan 2024 19:17:46 +0100
remove check that is always true in cx_arl_remove()
src/array_list.c | file | annotate | diff | comparison | revisions |
--- a/src/array_list.c Thu Jan 25 22:05:48 2024 +0100 +++ b/src/array_list.c Fri Jan 26 19:17:46 2024 +0100 @@ -327,11 +327,14 @@ list->size - index - 1, &arl->reallocator ); - if (result == 0) { - // decrease the size - list->size--; - } - return result; + + // cx_array_copy cannot fail, array cannot grow + assert(result == 0); + + // decrease the size + list->size--; + + return 0; } static void cx_arl_clear(struct cx_list_s *list) {