Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
b4b94258
Commit
b4b94258
authored
Mar 12, 2003
by
Howard Chu
Browse files
ITS
#2348
fix from HEAD
parent
0e5870cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-ldbm/idl.c
View file @
b4b94258
...
...
@@ -478,15 +478,9 @@ idl_insert_key(
*/
/* select the block to try inserting into *//* XXX linear search XXX */
for
(
i
=
0
;
!
ID_BLOCK_NOID
(
idl
,
i
)
&&
id
>
ID_BLOCK_ID
(
idl
,
i
);
i
++
)
for
(
i
=
0
;
!
ID_BLOCK_NOID
(
idl
,
i
)
&&
id
>
=
ID_BLOCK_ID
(
idl
,
i
);
i
++
)
;
/* NULL */
/* The ID already exists in the IDL, no insert needed */
if
(
ID_BLOCK_ID
(
idl
,
i
)
==
id
)
{
idl_free
(
idl
);
return
0
;
}
if
(
i
!=
0
)
{
i
--
;
first
=
0
;
...
...
@@ -494,6 +488,11 @@ idl_insert_key(
first
=
1
;
}
/* At this point the following condition must be true:
* ID_BLOCK_ID(idl, i) <= id && id < ID_BLOCK_ID(idl, i+1)
* except when i is the first or the last block.
*/
/* get the block */
cont_alloc
(
&
k2
,
&
key
);
cont_id
(
&
k2
,
ID_BLOCK_ID
(
idl
,
i
)
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment