stop coverity warning (realloc).

This commit is contained in:
Enno Rehling 2018-12-09 18:56:04 +01:00
parent 07d2278741
commit 6bf33f9fc2

View file

@ -260,6 +260,7 @@ static int *keys_update(int *base, int key, int val)
ptrdiff_t diff = kv - base; ptrdiff_t diff = kv - base;
sz = keys_size(n + 1); sz = keys_size(n + 1);
base = realloc(base, (sz * 2 + 1) * sizeof(int)); base = realloc(base, (sz * 2 + 1) * sizeof(int));
if (!base) abort();
kv = base + diff; kv = base + diff;
} }
base[0] = n + 1; base[0] = n + 1;