diff options
Diffstat (limited to 'lib/dbm/src/hash_buf.c')
-rw-r--r-- | lib/dbm/src/hash_buf.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/dbm/src/hash_buf.c b/lib/dbm/src/hash_buf.c index 22e98c90a..581ba169a 100644 --- a/lib/dbm/src/hash_buf.c +++ b/lib/dbm/src/hash_buf.c @@ -120,8 +120,7 @@ __get_buf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp, int newpage) bp = NULL; if (!newpage) is_disk = BUF_DISK; - } - else { + } else { /* Grab buffer out of directory */ segment_ndx = addr & (hashp->SGSIZE - 1); @@ -173,8 +172,7 @@ __get_buf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp, int newpage) segp[segment_ndx] = bp; #endif } - } - else { + } else { BUF_REMOVE(bp); MRU_INSERT(bp); } @@ -225,8 +223,7 @@ newbuf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp) if (hashp->nbufs) hashp->nbufs--; - } - else { + } else { /* Kick someone out */ BUF_REMOVE(bp); /* @@ -331,8 +328,7 @@ newbuf(HTAB *hashp, uint32 addr, BUFHEAD *prev_bp) #endif prev_bp->ovfl = bp; bp->flags = 0; - } - else + } else bp->flags = BUF_BUCKET; MRU_INSERT(bp); return (bp); @@ -394,8 +390,7 @@ __buf_free(HTAB *hashp, int do_free, int to_disk) BUF_REMOVE(bp); free(bp); bp = LRU; - } - else + } else bp = bp->prev; } return (0); |