summaryrefslogtreecommitdiffstats
path: root/src/idmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idmap.c')
-rw-r--r--src/idmap.c2
1 files changed, 1 insertions, 1 deletions
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);