diff options
author | phk <phk@FreeBSD.org> | 2004-09-07 07:32:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-09-07 07:32:40 +0000 |
commit | 71485468ce02f55e15d51aa1bc88ccf15b41eeb7 (patch) | |
tree | 67cffc335ace39ab433f64aeafb680324c0f2dc4 /sys/vm | |
parent | 1c10f3deec70710e669a2f0c46f92860c0131efb (diff) | |
download | FreeBSD-src-71485468ce02f55e15d51aa1bc88ccf15b41eeb7.zip FreeBSD-src-71485468ce02f55e15d51aa1bc88ccf15b41eeb7.tar.gz |
add KASSERTS
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vnode_pager.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index f79e516..2b174bc 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -792,8 +792,10 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage) * calculate the size of the transfer */ size = count * PAGE_SIZE; + KASSERT(count > 0, ("zero count")); if ((foff + size) > object->un_pager.vnp.vnp_size) size = object->un_pager.vnp.vnp_size - foff; + KASSERT(size > 0, ("zero size")); /* * round up physical size for real devices. |