diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-01-07 14:06:45 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-01-07 14:06:45 -0600 |
commit | 4e621f3ad38286c71b7c9c3f837415d1b9415008 (patch) | |
tree | dc4c5917658c4ba10c1fed027ed7e9d5fbc912b8 /src | |
parent | 0ed5c700109c4a824c40965fb53a53be2a9e264d (diff) | |
download | ofono-4e621f3ad38286c71b7c9c3f837415d1b9415008.tar.bz2 |
Change the semantics to return id > max on failure
Diffstat (limited to 'src')
-rw-r--r-- | src/idmap.c | 2 |
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); |