1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3-lib use True and False in bitmap.c

This commit is contained in:
Andrew Bartlett 2011-07-07 18:18:38 +10:00
parent 60f353a144
commit 198ad4df31

View File

@ -64,10 +64,10 @@ bool bitmap_set(struct bitmap *bm, unsigned i)
if (i >= bm->n) { if (i >= bm->n) {
DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n", DEBUG(0,("Setting invalid bitmap entry %d (of %d)\n",
i, bm->n)); i, bm->n));
return False; return false;
} }
bm->b[i/32] |= (1<<(i%32)); bm->b[i/32] |= (1<<(i%32));
return True; return true;
} }
/**************************************************************************** /****************************************************************************
@ -78,10 +78,10 @@ bool bitmap_clear(struct bitmap *bm, unsigned i)
if (i >= bm->n) { if (i >= bm->n) {
DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n", DEBUG(0,("clearing invalid bitmap entry %d (of %d)\n",
i, bm->n)); i, bm->n));
return False; return false;
} }
bm->b[i/32] &= ~(1<<(i%32)); bm->b[i/32] &= ~(1<<(i%32));
return True; return true;
} }
/**************************************************************************** /****************************************************************************
@ -89,11 +89,11 @@ query a bit in a bitmap
****************************************************************************/ ****************************************************************************/
bool bitmap_query(struct bitmap *bm, unsigned i) bool bitmap_query(struct bitmap *bm, unsigned i)
{ {
if (i >= bm->n) return False; if (i >= bm->n) return false;
if (bm->b[i/32] & (1<<(i%32))) { if (bm->b[i/32] & (1<<(i%32))) {
return True; return true;
} }
return False; return false;
} }
/**************************************************************************** /****************************************************************************