The position in array_remove_at could be theoretically larger
than unsigned int. Switch to size_t to stay in sync with all
other such arguments in array context.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/68
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
qsort(array->array, array->count, sizeof(void *), cmp);
}
-int array_remove_at(struct array *array, unsigned int pos)
+int array_remove_at(struct array *array, size_t pos)
{
if (array->count <= pos)
return -ENOENT;
void array_pop(struct array *array);
void array_free_array(struct array *array);
void array_sort(struct array *array, int (*cmp)(const void *a, const void *b));
-int array_remove_at(struct array *array, unsigned int pos);
+int array_remove_at(struct array *array, size_t pos);