From: Robert Spalek Date: Fri, 25 Nov 2005 15:02:47 +0000 (+0000) Subject: create BIT_ARRAY_ALLOC() X-Git-Tag: holmes-import~704 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=77c888a5fe147f4b63d5468482bb06470f50f244;p=libucw.git create BIT_ARRAY_ALLOC() --- diff --git a/lib/bitarray.h b/lib/bitarray.h index 0815db62..9e1de8d4 100644 --- a/lib/bitarray.h +++ b/lib/bitarray.h @@ -13,6 +13,7 @@ typedef u32 *bitarray_t; #define BIT_ARRAY_WORDS(n) (((n)+31)/32) #define BIT_ARRAY_BYTES(n) (4*BIT_ARRAY_WORDS(n)) #define BIT_ARRAY(name,size) u32 name[BIT_ARRAY_WORDS(size)] +#define BIT_ARRAY_ALLOC(size) ((bitarray_t) xmalloc(BIT_ARRAY_BYTES(size))) static inline void bit_array_zero(bitarray_t a, uns n)