fix
This commit is contained in:
parent
1909954b42
commit
a2b1a22a79
1 changed files with 2 additions and 2 deletions
|
@ -633,11 +633,11 @@ sparsemap_idx_t
|
||||||
_sparsemap_merge(sparsemap_t **map, sparsemap_t *other)
|
_sparsemap_merge(sparsemap_t **map, sparsemap_t *other)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
ssize_t retval = sparsemap_merge(*map, other);
|
int retval = sparsemap_merge(*map, other);
|
||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
if (errno == ENOSPC) {
|
if (errno == ENOSPC) {
|
||||||
size_t new_size = retval + (64 - (retval % 64)) + 64;
|
size_t new_size = retval + (64 - (retval % 64)) + 64;
|
||||||
*map = sparsemap_set_data_size(*map, sparsemap_get_capacity(*map) + , NULL);
|
*map = sparsemap_set_data_size(*map, sparsemap_get_capacity(*map) + new_size, NULL);
|
||||||
assert(*map != NULL);
|
assert(*map != NULL);
|
||||||
errno = 0;
|
errno = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue