From dce4c82d8ec3a00fb69688e28600c163adddab15 Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Thu, 27 Feb 2003 08:56:41 +0000 Subject: [PATCH] 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) --- sys/dev/hea/eni_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hea/eni_buffer.c b/sys/dev/hea/eni_buffer.c index 0230c294098..47ac14f349e 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;