diff options
author | delphij <delphij@FreeBSD.org> | 2009-03-28 05:45:29 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-03-28 05:45:29 +0000 |
commit | 21b00fc42b2ab16bc19a270792a72971dc10973f (patch) | |
tree | 2886e758aa8188bda68aeabd1e440992d0ed0637 /lib/libc/db/recno | |
parent | 64850243010a49e44236d9a5a79333f37746f169 (diff) | |
download | FreeBSD-src-21b00fc42b2ab16bc19a270792a72971dc10973f.zip FreeBSD-src-21b00fc42b2ab16bc19a270792a72971dc10973f.tar.gz |
Several signed/unsigned warning fixes.
Diffstat (limited to 'lib/libc/db/recno')
-rw-r--r-- | lib/libc/db/recno/rec_close.c | 4 | ||||
-rw-r--r-- | lib/libc/db/recno/rec_put.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c index 8520c85..2d1ff84 100644 --- a/lib/libc/db/recno/rec_close.c +++ b/lib/libc/db/recno/rec_close.c @@ -150,7 +150,7 @@ __rec_sync(const DB *dbp, u_int flags) status = (dbp->seq)(dbp, &key, &data, R_FIRST); while (status == RET_SUCCESS) { if (_write(t->bt_rfd, data.data, data.size) != - data.size) + (ssize_t)data.size) return (RET_ERROR); status = (dbp->seq)(dbp, &key, &data, R_NEXT); } @@ -162,7 +162,7 @@ __rec_sync(const DB *dbp, u_int flags) while (status == RET_SUCCESS) { iov[0].iov_base = data.data; iov[0].iov_len = data.size; - if (_writev(t->bt_rfd, iov, 2) != data.size + 1) + if (_writev(t->bt_rfd, iov, 2) != (ssize_t)(data.size + 1)) return (RET_ERROR); status = (dbp->seq)(dbp, &key, &data, R_NEXT); } diff --git a/lib/libc/db/recno/rec_put.c b/lib/libc/db/recno/rec_put.c index a6defc9..441cced 100644 --- a/lib/libc/db/recno/rec_put.c +++ b/lib/libc/db/recno/rec_put.c @@ -251,7 +251,7 @@ __rec_iput(BTREE *t, recno_t nrec, const DBT *data, u_int flags) * the offset array, shift the pointers up. */ nbytes = NRLEAFDBT(data->size); - if (h->upper - h->lower < nbytes + sizeof(indx_t)) { + if ((u_int32_t)(h->upper - h->lower) < nbytes + sizeof(indx_t)) { status = __bt_split(t, h, NULL, data, dflags, nbytes, idx); if (status == RET_SUCCESS) ++t->bt_nrecs; |