diff options
Diffstat (limited to 'lib/libc/db/recno/rec_utils.c')
-rw-r--r-- | lib/libc/db/recno/rec_utils.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libc/db/recno/rec_utils.c b/lib/libc/db/recno/rec_utils.c index 0294d95..39285a5 100644 --- a/lib/libc/db/recno/rec_utils.c +++ b/lib/libc/db/recno/rec_utils.c @@ -67,9 +67,7 @@ __rec_ret(BTREE *t, EPG *e, recno_t nrec, DBT *key, DBT *data) /* We have to copy the key, it's not on the page. */ if (sizeof(recno_t) > t->bt_rkey.size) { - p = (void *)(t->bt_rkey.data == NULL ? - malloc(sizeof(recno_t)) : - realloc(t->bt_rkey.data, sizeof(recno_t))); + p = realloc(t->bt_rkey.data, sizeof(recno_t)); if (p == NULL) return (RET_ERROR); t->bt_rkey.data = p; @@ -97,9 +95,7 @@ dataonly: } else if (F_ISSET(t, B_DB_LOCK)) { /* Use +1 in case the first record retrieved is 0 length. */ if (rl->dsize + 1 > t->bt_rdata.size) { - p = (void *)(t->bt_rdata.data == NULL ? - malloc(rl->dsize + 1) : - realloc(t->bt_rdata.data, rl->dsize + 1)); + p = realloc(t->bt_rdata.data, rl->dsize + 1); if (p == NULL) return (RET_ERROR); t->bt_rdata.data = p; |