Path: blob/main/crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c.patch
34928 views
*** /tmp/,RCSt1a21714 Wed Apr 3 11:49:15 19961--- hash.c Wed Apr 3 08:43:04 19962***************3*** 399,4054/* Create pages for these buckets */5/*6for (i = 0; i <= hashp->hdr.max_bucket; i++) {7! if (__new_page(hashp, i, A_BUCKET) != 0)8return (-1);9}10*/1112--- 399,405 -----13/* Create pages for these buckets */14/*15for (i = 0; i <= hashp->hdr.max_bucket; i++) {16! if (__new_page(hashp, (u_int32_t)i, A_BUCKET) != 0)17return (-1);18}19*/20***************21*** 560,56722* XXX23* Check success/failure conditions.24*/25! mpool_sync(hashp->mp);26! return (0);27}2829/*3031--- 560,566 -----32* XXX33* Check success/failure conditions.34*/35! return (flush_meta(hashp) || mpool_sync(hashp->mp));36}3738/*39***************40*** 585,59141hput_header(hashp);4243for (i = 0; i < NCACHED; i++)44! if (hashp->mapp[i])45if (__put_page(hashp,46(PAGE16 *)hashp->mapp[i], A_BITMAP, 1))47return (-1);4849--- 584,590 -----50hput_header(hashp);5152for (i = 0; i < NCACHED; i++)53! if (hashp->mapp[i]) {54if (__put_page(hashp,55(PAGE16 *)hashp->mapp[i], A_BITMAP, 1))56return (-1);57***************58*** 589,59459if (__put_page(hashp,60(PAGE16 *)hashp->mapp[i], A_BITMAP, 1))61return (-1);62return (0);63}646566--- 588,595 -----67if (__put_page(hashp,68(PAGE16 *)hashp->mapp[i], A_BITMAP, 1))69return (-1);70+ hashp->mapp[i] = NULL;71+ }72return (0);73}7475***************76*** 726,73277#ifdef HASH_STATISTICS78hash_collisions++;79#endif80-81__get_item_done(hashp, &cursor);8283/*8485--- 727,732 -----86#ifdef HASH_STATISTICS87hash_collisions++;88#endif89__get_item_done(hashp, &cursor);9091/*92***************93*** 773,77894if (__delpair(hashp, &cursor, &item_info) ||95__addel(hashp, &item_info, key, val, UNKNOWN, 0))96return (ERROR);97if (item_info.caused_expand)98__expand_table(hashp);99break;100101--- 773,779 -----102if (__delpair(hashp, &cursor, &item_info) ||103__addel(hashp, &item_info, key, val, UNKNOWN, 0))104return (ERROR);105+ __get_item_done(hashp, &cursor);106if (item_info.caused_expand)107__expand_table(hashp);108break;109110111