diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-19 12:06:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:01:55 -0500 |
commit | 72093ce62f1e09db86452720fe8280ad66824cde (patch) | |
tree | 62aa8cb4fc470254be4283efb20669858ab21189 /source4/ntvfs | |
parent | 343545a8836d1665bb3c41974d743b03fd0b6446 (diff) | |
download | samba-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/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_search.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index c255558369..fb81c86bcc 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -157,7 +157,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, return NT_STATUS_NO_MEMORY; } - fnum = idr_get_new(pvfs->idtree_fnum, f, 0x10000); + fnum = idr_get_new(pvfs->idtree_fnum, f, UINT16_MAX); if (fnum == -1) { talloc_free(f); return NT_STATUS_TOO_MANY_OPENED_FILES; diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index 7b0da321d3..1464609e98 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -287,7 +287,7 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs, /* we need to give a handle back to the client so it can continue a search */ - id = idr_get_new(pvfs->idtree_search, search, 0x100); + id = idr_get_new(pvfs->idtree_search, search, UINT8_MAX); if (id == -1) { return NT_STATUS_INSUFFICIENT_RESOURCES; } @@ -415,7 +415,7 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs, return status; } - id = idr_get_new(pvfs->idtree_search, search, 0x10000); + id = idr_get_new(pvfs->idtree_search, search, UINT16_MAX); if (id == -1) { return NT_STATUS_INSUFFICIENT_RESOURCES; } |