From 2c29a92c5ed3f6cb157ddc4fe6698c9c43e17ff2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 1 May 2005 19:50:23 +0000 Subject: [PATCH] Introduced bit_array_set_all(). --- lib/bitarray.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/bitarray.h b/lib/bitarray.h index dc2674b9..0815db62 100644 --- a/lib/bitarray.h +++ b/lib/bitarray.h @@ -20,6 +20,12 @@ bit_array_zero(bitarray_t a, uns n) bzero(a, BIT_ARRAY_BYTES(n)); } +static inline void +bit_array_set_all(bitarray_t a, uns n) +{ + memset(a, 255, BIT_ARRAY_BYTES(n)); +} + static inline void bit_array_set(bitarray_t a, uns i) { -- 2.39.2