From 4d8d667bed137a2d791e9cb7befc3cbfb3a31c09 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 9 Mar 2011 20:34:33 -0800 Subject: [PATCH] bitmap: Fix mistakes in comments. Reported by a student of Borja Sotomayor . --- src/lib/kernel/bitmap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/kernel/bitmap.c b/src/lib/kernel/bitmap.c index d323b89..d14a98c 100644 --- a/src/lib/kernel/bitmap.c +++ b/src/lib/kernel/bitmap.c @@ -71,10 +71,10 @@ last_mask (const struct bitmap *b) /* Creation and destruction. */ -/* Initializes B to be a bitmap of BIT_CNT bits - and sets all of its bits to false. - Returns true if success, false if memory allocation - failed. */ +/* Creates and returns a pointer to a newly allocated bitmap with room for + BIT_CNT (or more) bits. Returns a null pointer if memory allocation fails. + The caller is responsible for freeing the bitmap, with bitmap_destroy(), + when it is no longer needed. */ struct bitmap * bitmap_create (size_t bit_cnt) { @@ -118,8 +118,7 @@ bitmap_buf_size (size_t bit_cnt) } /* Destroys bitmap B, freeing its storage. - Not for use on bitmaps created by - bitmap_create_preallocated(). */ + Not for use on bitmaps created by bitmap_create_in_buf(). */ void bitmap_destroy (struct bitmap *b) { -- 2.30.2