From: Robert Spalek Date: Wed, 4 Feb 2009 06:48:47 +0000 (-0800) Subject: make page_alloc(0) work X-Git-Tag: holmes-import~118^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=373665bbe5d757875d53d63b0a14bcdc10bb0e03;p=libucw.git make page_alloc(0) work --- diff --git a/ucw/bigalloc.c b/ucw/bigalloc.c index 7532a446..3133170e 100644 --- a/ucw/bigalloc.c +++ b/ucw/bigalloc.c @@ -17,6 +17,8 @@ void * page_alloc(u64 len) { + if (!len) + return NULL; if (len > SIZE_MAX) die("page_alloc: Size %llu is too large for the current architecture", (long long) len); ASSERT(!(len & (CPU_PAGE_SIZE-1)));