1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Simplify dm_bitset_create. (ejt)

This commit is contained in:
Alasdair Kergon 2010-04-19 21:08:32 +00:00
parent 72ab7270e0
commit da336123c2

View File

@ -26,17 +26,14 @@ dm_bitset_t dm_bitset_create(struct dm_pool *mem, unsigned num_bits)
if (mem) if (mem)
bs = dm_pool_zalloc(mem, size); bs = dm_pool_zalloc(mem, size);
else else if ((bs = dm_malloc(size)))
bs = dm_malloc(size); memset(mem, 0, size);
if (!bs) if (!bs)
return NULL; return NULL;
*bs = num_bits; *bs = num_bits;
if (!mem)
dm_bit_clear_all(bs);
return bs; return bs;
} }