summary refs log tree commit diff
path: root/db/mpool
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-11-15 04:08:00 +0000
committerUlrich Drepper <drepper@redhat.com>1996-11-15 04:08:00 +0000
commit54d79e995d5a6d0a393ed913b6e26dccc63de5b7 (patch)
treeb758eeac8325f123f161c8d62c5956dc2a6d2556 /db/mpool
parentb296c233447a37f77ccd9989fce24b45a8db1afa (diff)
downloadglibc-54d79e995d5a6d0a393ed913b6e26dccc63de5b7.tar.gz
glibc-54d79e995d5a6d0a393ed913b6e26dccc63de5b7.tar.xz
glibc-54d79e995d5a6d0a393ed913b6e26dccc63de5b7.zip
update from main archive 961114 cvs/libc-961115
Diffstat (limited to 'db/mpool')
-rw-r--r--db/mpool/mpool.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/db/mpool/mpool.c b/db/mpool/mpool.c
index a61041e091..9956aca87b 100644
--- a/db/mpool/mpool.c
+++ b/db/mpool/mpool.c
@@ -109,7 +109,7 @@ mpool_filter(mp, pgin, pgout, pgcookie)
 	mp->pgout = pgout;
 	mp->pgcookie = pgcookie;
 }
-	
+
 /*
  * mpool_new --
  *	Get a new page of memory.
@@ -205,7 +205,8 @@ mpool_get(mp, pgno, flags)
 	off = mp->pagesize * pgno;
 	if (lseek(mp->fd, off, SEEK_SET) != off)
 		return (NULL);
-	if ((nr = read(mp->fd, bp->page, mp->pagesize)) != mp->pagesize) {
+	if ((u_long) (nr = read(mp->fd, bp->page, mp->pagesize))
+	    != mp->pagesize) {
 		if (nr >= 0)
 			errno = EFTYPE;
 		return (NULL);
@@ -380,7 +381,7 @@ mpool_write(mp, bp)
 	off = mp->pagesize * bp->pgno;
 	if (lseek(mp->fd, off, SEEK_SET) != off)
 		return (RET_ERROR);
-	if (write(mp->fd, bp->page, mp->pagesize) != mp->pagesize)
+	if ((u_long) write(mp->fd, bp->page, mp->pagesize) != mp->pagesize)
 		return (RET_ERROR);
 
 	bp->flags &= ~MPOOL_DIRTY;
@@ -436,7 +437,7 @@ mpool_stat(mp)
 	    mp->pagealloc, mp->pageflush);
 	if (mp->cachehit + mp->cachemiss)
 		(void)fprintf(stderr,
-		    "%.0f%% cache hit rate (%lu hits, %lu misses)\n", 
+		    "%.0f%% cache hit rate (%lu hits, %lu misses)\n",
 		    ((double)mp->cachehit / (mp->cachehit + mp->cachemiss))
 		    * 100, mp->cachehit, mp->cachemiss);
 	(void)fprintf(stderr, "%lu page reads, %lu page writes\n",
@@ -456,7 +457,7 @@ mpool_stat(mp)
 			cnt = 0;
 		} else
 			sep = ", ";
-			
+
 	}
 	(void)fprintf(stderr, "\n");
 }