Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
92986c34
Commit
92986c34
authored
Nov 22, 2010
by
Hallvard Furuseth
Browse files
ITS#6715 cleanup: Handle attr_valfind(0 values) when SLAP_ATTR_SORTED_VALS
parent
b6870303
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/attr.c
View file @
92986c34
...
...
@@ -317,11 +317,11 @@ attr_valfind(
}
n
=
a
->
a_numvals
;
if
(
a
->
a_flags
&
SLAP_ATTR_SORTED_VALS
)
{
if
(
(
a
->
a_flags
&
SLAP_ATTR_SORTED_VALS
)
&&
n
)
{
/* Binary search */
unsigned
base
=
0
;
while
(
0
<
n
)
{
do
{
unsigned
pivot
=
n
>>
1
;
i
=
base
+
pivot
;
rc
=
value_match
(
&
match
,
a
->
a_desc
,
mr
,
flags
,
...
...
@@ -334,7 +334,7 @@ attr_valfind(
}
else
{
n
=
pivot
;
}
}
}
while
(
n
);
if
(
match
<
0
)
i
++
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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