summaryrefslogtreecommitdiffstats
path: root/sys/dev/hea
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-02-27 08:56:41 +0000
committerharti <harti@FreeBSD.org>2003-02-27 08:56:41 +0000
commit608b22b2688ff3385362c397afa2e91cb25e4712 (patch)
tree3f8f5811ce2ce014ed9383a08dad49c9120adff2 /sys/dev/hea
parent6fdf4a0bdf8d8fc7104f7efec3d08b4b41e50d0f (diff)
downloadFreeBSD-src-608b22b2688ff3385362c397afa2e91cb25e4712.zip
FreeBSD-src-608b22b2688ff3385362c397afa2e91cb25e4712.tar.gz
When we have found a chunk of memory that is large enough and have computed
a correctly aligned address in this block we really want to check, that the part of the chunk that starts at the aligned address is large enough with regard to the original request. Comparing it to 0 makes no sense, because this is always true except in the rare case, that the aligned address is just at the end of the chunk. Approved by: jake (mentor)
Diffstat (limited to 'sys/dev/hea')
-rw-r--r--sys/dev/hea/eni_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/hea/eni_buffer.c b/sys/dev/hea/eni_buffer.c
index 0230c29..47ac14f 100644
--- a/sys/dev/hea/eni_buffer.c
+++ b/sys/dev/hea/eni_buffer.c
@@ -267,7 +267,7 @@ eni_allocate_buffer ( eup, size )
/*
* If we use this alignment, will it still fit?
*/
- if ( (eptr->size - (nbase - eptr->base)) >= 0 )
+ if ( (eptr->size - (nbase - eptr->base)) >= nsize )
{
Mbd *etmp;
OpenPOWER on IntegriCloud