X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/fbd86d4cc20b02a10edcca92fb7ae0a143e63cc4..1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58:/db/btree/bt_overflow-fbsd.c diff --git a/db/btree/bt_overflow-fbsd.c b/db/btree/bt_overflow-fbsd.c index c0d363f..25e3000 100644 --- a/db/btree/bt_overflow-fbsd.c +++ b/db/btree/bt_overflow-fbsd.c @@ -13,10 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -38,7 +34,7 @@ static char sccsid[] = "@(#)bt_overflow.c 8.5 (Berkeley) 7/16/94"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/db/btree/bt_overflow.c,v 1.3 2002/03/22 21:52:01 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/db/btree/bt_overflow.c,v 1.6 2009/03/05 00:57:01 delphij Exp $"); #include @@ -79,12 +75,7 @@ __FBSDID("$FreeBSD: src/lib/libc/db/btree/bt_overflow.c,v 1.3 2002/03/22 21:52:0 * RET_ERROR, RET_SUCCESS */ int -__ovfl_get(t, p, ssz, buf, bufsz) - BTREE *t; - void *p; - size_t *ssz; - void **buf; - size_t *bufsz; +__ovfl_get(BTREE *t, void *p, size_t *ssz, void **buf, size_t *bufsz) { PAGE *h; pgno_t pg; @@ -101,7 +92,7 @@ __ovfl_get(t, p, ssz, buf, bufsz) #endif /* Make the buffer bigger as necessary. */ if (*bufsz < sz) { - *buf = (char *)(*buf == NULL ? malloc(sz) : reallocf(*buf, sz)); + *buf = reallocf(*buf, sz); if (*buf == NULL) return (RET_ERROR); *bufsz = sz; @@ -138,10 +129,7 @@ __ovfl_get(t, p, ssz, buf, bufsz) * RET_ERROR, RET_SUCCESS */ int -__ovfl_put(t, dbt, pg) - BTREE *t; - const DBT *dbt; - pgno_t *pg; +__ovfl_put(BTREE *t, const DBT *dbt, pgno_t *pg) { PAGE *h, *last; void *p; @@ -192,9 +180,7 @@ __ovfl_put(t, dbt, pg) * RET_ERROR, RET_SUCCESS */ int -__ovfl_delete(t, p) - BTREE *t; - void *p; +__ovfl_delete(BTREE *t, void *p) { PAGE *h; pgno_t pg;