diff options
author | delphij <delphij@FreeBSD.org> | 2009-03-04 00:58:04 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-03-04 00:58:04 +0000 |
commit | 60ee3b72bf398f3dd2403737817dc830d80a904f (patch) | |
tree | 756648717503997efc92e73d40047dd45f88ad87 /lib/libc/db/recno | |
parent | 3b8bffce0869741be8850515a08b3660f97e8315 (diff) | |
download | FreeBSD-src-60ee3b72bf398f3dd2403737817dc830d80a904f.zip FreeBSD-src-60ee3b72bf398f3dd2403737817dc830d80a904f.tar.gz |
Style changes (including additional casts to shut up warnings). This
commit does not affect MD5 of object file.
Diffstat (limited to 'lib/libc/db/recno')
-rw-r--r-- | lib/libc/db/recno/rec_close.c | 5 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_open.c | 2 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_put.c | 2 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_search.c | 8 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_seq.c | 2 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_utils.c | 2 |
6 files changed, 11 insertions, 10 deletions
diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index c4f14be..8520c85 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -82,9 +82,10 @@ __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) @@ -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); diff --git a/lib/libc/db/recno/rec_open.c b/lib/libc/db/recno/rec_open.c index 78a3056..dd286c0 100644 --- a/lib/libc/db/recno/rec_open.c +++ b/lib/libc/db/recno/rec_open.c @@ -203,7 +203,7 @@ slow: if ((t->bt_rfp = fdopen(rfd, "r")) == NULL) if (openinfo && openinfo->flags & R_SNAPSHOT && !F_ISSET(t, R_EOF | R_INMEM) && t->bt_irec(t, MAX_REC_NUMBER) == RET_ERROR) - goto err; + goto err; return (dbp); einval: errno = EINVAL; diff --git a/lib/libc/db/recno/rec_put.c b/lib/libc/db/recno/rec_put.c index ae60065..a6defc9 100644 --- a/lib/libc/db/recno/rec_put.c +++ b/lib/libc/db/recno/rec_put.c @@ -169,7 +169,7 @@ einval: errno = EINVAL; t->bt_cursor.rcursor = nrec; break; } - + F_SET(t, R_MODIFIED); return (__rec_ret(t, NULL, nrec, key, NULL)); } diff --git a/lib/libc/db/recno/rec_search.c b/lib/libc/db/recno/rec_search.c index 68e7f2d..8115e0f 100644 --- a/lib/libc/db/recno/rec_search.c +++ b/lib/libc/db/recno/rec_search.c @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); * Parameters: * t: tree to search * recno: key to find - * op: search operation + * op: search operation * * Returns: * EPG for matching record, if any, or the EPG for the location of the @@ -87,7 +87,7 @@ __rec_search(BTREE *t, recno_t recno, enum SRCHOP op) } BT_PUSH(t, pg, idx - 1); - + pg = r->pgno; switch (op) { case SDELETE: @@ -114,8 +114,8 @@ err: sverrno = errno; --GETRINTERNAL(h, parent->index)->nrecs; else ++GETRINTERNAL(h, parent->index)->nrecs; - mpool_put(t->bt_mp, h, MPOOL_DIRTY); - } + mpool_put(t->bt_mp, h, MPOOL_DIRTY); + } errno = sverrno; return (NULL); } diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c index 9290d0e..42d98d7 100644 --- a/lib/libc/db/recno/rec_seq.c +++ b/lib/libc/db/recno/rec_seq.c @@ -103,7 +103,7 @@ __rec_seq(const DB *dbp, DBT *key, DBT *data, u_int flags) einval: errno = EINVAL; return (RET_ERROR); } - + if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) { if (!F_ISSET(t, R_EOF | R_INMEM) && (status = t->bt_irec(t, nrec)) != RET_SUCCESS) diff --git a/lib/libc/db/recno/rec_utils.c b/lib/libc/db/recno/rec_utils.c index 4a8edbc..0294d95 100644 --- a/lib/libc/db/recno/rec_utils.c +++ b/lib/libc/db/recno/rec_utils.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); * e: key/data pair to be returned * nrec: record number * key: user's key structure - * data: user's data structure + * data: user's data structure * * Returns: * RET_SUCCESS, RET_ERROR. |