X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;ds=sidebyside;f=pvector%2Fhashvector.c;h=11fdae845a9837e04e46ebc2450b433078af0ed0;hb=98b44ec4b554d4acee87cebef452c7eb12cf5add;hp=5164ffe2e209291388fafcbf812ae57940ed7233;hpb=6c786664c89167fcc8e41e3c6cd5ee6d340e37f9;p=rrq%2Frrqmisc.git diff --git a/pvector/hashvector.c b/pvector/hashvector.c index 5164ffe..11fdae8 100644 --- a/pvector/hashvector.c +++ b/pvector/hashvector.c @@ -105,8 +105,9 @@ int hashvector_delete(hashvector *hv,void *item) { } *p = HV_HOLE; hv->holes++; + hv->fill--; if ( hv->table.size > 256 ) { - if ( hv->fill < hv->table.size / 2 ) { + if ( hv->fill < hv->table.size / 4 ) { hashvector_resize( hv, hv->table.size / 2 ); } }