summaryrefslogtreecommitdiff
path: root/source4/lib/idtree.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-19 12:06:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:01:55 -0500
commit72093ce62f1e09db86452720fe8280ad66824cde (patch)
tree62aa8cb4fc470254be4283efb20669858ab21189 /source4/lib/idtree.c
parent343545a8836d1665bb3c41974d743b03fd0b6446 (diff)
downloadsamba-72093ce62f1e09db86452720fe8280ad66824cde.tar.gz
samba-72093ce62f1e09db86452720fe8280ad66824cde.tar.bz2
samba-72093ce62f1e09db86452720fe8280ad66824cde.zip
r3064: - use UINT8_MAX and UINT16_MAX instead of hex values for idr_get_new() limits
- change idr_get_new() to use > instead of >= in the limit check (This used to be commit 834b09929bcb8aabdd151b7c2306001497cabdb4)
Diffstat (limited to 'source4/lib/idtree.c')
-rw-r--r--source4/lib/idtree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/idtree.c b/source4/lib/idtree.c
index 80f7df97a0..1243c4f3b9 100644
--- a/source4/lib/idtree.c
+++ b/source4/lib/idtree.c
@@ -322,7 +322,7 @@ void *idr_init(TALLOC_CTX *mem_ctx)
int idr_get_new(void *idp, void *ptr, int limit)
{
int ret = idr_get_new_above_int((struct idr *)idp, ptr, 0);
- if (ret >= limit) {
+ if (ret > limit) {
idr_remove(idp, ret);
return -1;
}
@@ -336,7 +336,7 @@ int idr_get_new(void *idp, void *ptr, int limit)
int idr_get_new_above(void *idp, void *ptr, int starting_id, int limit)
{
int ret = idr_get_new_above_int((struct idr *)idp, ptr, starting_id);
- if (ret >= limit) {
+ if (ret > limit) {
idr_remove(idp, ret);
return -1;
}