From 02654885c3218680f7784a94dec913420f7a033e Mon Sep 17 00:00:00 2001 From: delphij Date: Thu, 5 Mar 2009 00:57:01 +0000 Subject: Our realloc(3) and reallocf(3) can handle NULL, which turns it into a malloc(3) call, so don't test if a pointer is NULL. Obtained from: OpenBSD (in spirit) --- lib/libc/db/btree/bt_overflow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/db/btree/bt_overflow.c') diff --git a/lib/libc/db/btree/bt_overflow.c b/lib/libc/db/btree/bt_overflow.c index e618c8c..266d599 100644 --- a/lib/libc/db/btree/bt_overflow.c +++ b/lib/libc/db/btree/bt_overflow.c @@ -92,7 +92,7 @@ __ovfl_get(BTREE *t, void *p, size_t *ssz, void **buf, size_t *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; -- cgit v1.1