cache: use pkgconf_reallocarray stub
ci/woodpecker/push/woodpecker Pipeline was successful Details

pull/241/head
Ariadne Conill 2022-06-26 04:38:02 +00:00
parent c1579d381c
commit ffa0805d58
1 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ pkgconf_cache_add(pkgconf_client_t *client, pkgconf_pkg_t *pkg)
pkg->flags |= PKGCONF_PKG_PROPF_CACHED;
++client->cache_count;
client->cache_table = reallocarray(client->cache_table,
client->cache_table = pkgconf_reallocarray(client->cache_table,
client->cache_count, sizeof (void *));
client->cache_table[client->cache_count - 1] = pkg;
@ -181,7 +181,7 @@ pkgconf_cache_remove(pkgconf_client_t *client, pkgconf_pkg_t *pkg)
}
client->cache_count--;
client->cache_table = reallocarray(client->cache_table,
client->cache_table = pkgconf_reallocarray(client->cache_table,
client->cache_count, sizeof(void *));
}
@ -214,7 +214,7 @@ pkgconf_cache_free(pkgconf_client_t *client)
pkgconf_pkg_t **cache_table;
size_t i, count;
cache_table = reallocarray(NULL, client->cache_count, sizeof (void *));
cache_table = pkgconf_reallocarray(NULL, client->cache_count, sizeof (void *));
memcpy(cache_table, client->cache_table,
client->cache_count * sizeof (void *));