Style changes (including additional casts to shut up warnings). This

commit does not affect MD5 of object file.
This commit is contained in:
Xin LI 2009-03-04 00:58:04 +00:00
parent 725e9bc78c
commit 3df1d93483
15 changed files with 35 additions and 36 deletions

View File

@ -406,7 +406,7 @@ __bt_pdelete(BTREE *t, PAGE *h)
* root page. If it's the rootpage, turn it back into an empty
* leaf page.
*/
if (NEXTINDEX(pg) == 1)
if (NEXTINDEX(pg) == 1) {
if (pg->pgno == P_ROOT) {
pg->lower = BTDATAOFF;
pg->upper = t->bt_psize;
@ -416,7 +416,7 @@ __bt_pdelete(BTREE *t, PAGE *h)
return (RET_ERROR);
continue;
}
else {
} else {
/* Pack remaining key items at the end of the page. */
nksize = NBINTERNAL(bi->ksize);
from = (char *)pg + pg->upper;

View File

@ -412,8 +412,8 @@ __big_return(HTAB *hashp, BUFHEAD *bufp, int ndx, DBT *val, int set_current)
return (0);
}
val->size = collect_data(hashp, bufp, (int)len, set_current);
if (val->size == -1)
val->size = (size_t)collect_data(hashp, bufp, (int)len, set_current);
if (val->size == (size_t)-1)
return (-1);
if (save_p->addr != save_addr) {
/* We are pretty short on buffers. */
@ -484,8 +484,8 @@ collect_data(HTAB *hashp, BUFHEAD *bufp, int len, int set)
int
__big_keydata(HTAB *hashp, BUFHEAD *bufp, DBT *key, DBT *val, int set)
{
key->size = collect_key(hashp, bufp, 0, val, set);
if (key->size == -1)
key->size = (size_t)collect_key(hashp, bufp, 0, val, set);
if (key->size == (size_t)-1)
return (-1);
key->data = (u_char *)hashp->tmp_key;
return (0);
@ -544,12 +544,10 @@ __big_split(HTAB *hashp,
u_int32_t obucket, /* Old Bucket */
SPLIT_RETURN *ret)
{
BUFHEAD *tmpp;
u_int16_t *tp;
BUFHEAD *bp;
BUFHEAD *bp, *tmpp;
DBT key, val;
u_int32_t change;
u_int16_t free_space, n, off;
u_int16_t free_space, n, off, *tp;
bp = big_keyp;
@ -561,7 +559,7 @@ __big_split(HTAB *hashp,
if ( (ret->next_addr = __find_last_page(hashp, &big_keyp)) ) {
if (!(ret->nextp =
__get_buf(hashp, ret->next_addr, big_keyp, 0)))
return (-1);;
return (-1);
} else
ret->nextp = NULL;

View File

@ -82,10 +82,11 @@ __rec_close(DB *dbp)
if (F_ISSET(t, R_CLOSEFP)) {
if (fclose(t->bt_rfp))
status = RET_ERROR;
} else
} else {
if (_close(t->bt_rfd))
status = RET_ERROR;
}
}
if (__bt_close(dbp) == RET_ERROR)
status = RET_ERROR;
@ -154,7 +155,7 @@ __rec_sync(const DB *dbp, u_int flags)
status = (dbp->seq)(dbp, &key, &data, R_NEXT);
}
} else {
iov[1].iov_base = (char *)&t->bt_bval;
iov[1].iov_base = &t->bt_bval;
iov[1].iov_len = 1;
status = (dbp->seq)(dbp, &key, &data, R_FIRST);