diff options
author | Nikias Bassen | 2023-05-21 00:12:57 +0200 |
---|---|---|
committer | Nikias Bassen | 2023-05-21 00:12:57 +0200 |
commit | f28cf0f1e51c7554d590cbec56abac46b4a44b4e (patch) | |
tree | 4e2e2038fe0b780dd9595deecbe887d89a3e3de8 /src/ptrarray.c | |
parent | d772fd74d2a52646c34d558220533547725a2298 (diff) | |
download | libplist-f28cf0f1e51c7554d590cbec56abac46b4a44b4e.tar.gz libplist-f28cf0f1e51c7554d590cbec56abac46b4a44b4e.tar.bz2 |
Add explicit casts and fix return type mismatches
Diffstat (limited to 'src/ptrarray.c')
-rw-r--r-- | src/ptrarray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ptrarray.c b/src/ptrarray.c index c499773..3a11031 100644 --- a/src/ptrarray.c +++ b/src/ptrarray.c @@ -45,7 +45,7 @@ void ptr_array_insert(ptrarray_t *pa, void *data, long array_index) if (!pa || !pa->pdata) return; long remaining = pa->capacity-pa->len; if (remaining == 0) { - pa->pdata = realloc(pa->pdata, sizeof(void*) * (pa->capacity + pa->capacity_step)); + pa->pdata = (void**)realloc(pa->pdata, sizeof(void*) * (pa->capacity + pa->capacity_step)); pa->capacity += pa->capacity_step; } if (array_index < 0 || array_index >= pa->len) { |