From 4e621f3ad38286c71b7c9c3f837415d1b9415008 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 7 Jan 2010 14:06:45 -0600 Subject: Change the semantics to return id > max on failure --- src/idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/idmap.c') diff --git a/src/idmap.c b/src/idmap.c index a42bf118..b69b0333 100644 --- a/src/idmap.c +++ b/src/idmap.c @@ -146,7 +146,7 @@ unsigned int idmap_alloc(struct idmap *idmap) bit = find_next_zero_bit(idmap->bits, idmap->size, 0); if (bit >= idmap->size) - return 0; + return idmap->max + 1; offset = bit / BITS_PER_LONG; idmap->bits[offset] |= 1 << (bit % BITS_PER_LONG); -- cgit v1.2.3