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
openldap
OpenLDAP
Commits
d4df1af5
Commit
d4df1af5
authored
Jul 26, 2001
by
Kurt Zeilenga
Browse files
Misc cleanup of asserts
parent
92ec77f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema_init.c
View file @
d4df1af5
...
...
@@ -132,13 +132,13 @@ int octetStringIndexer(
digest
.
bv_val
=
HASHdigest
;
digest
.
bv_len
=
sizeof
(
HASHdigest
);
/* we should have at least one value at this point */
assert
(
values
!=
NULL
&&
values
[
0
]
!=
NULL
);
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* just count them */
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
keys
=
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
slen
=
strlen
(
syntax
->
ssyn_oid
);
...
...
@@ -853,7 +853,6 @@ approxIndexer(
return
LDAP_SUCCESS
;
}
int
approxFilter
(
slap_mask_t
use
,
...
...
@@ -968,8 +967,10 @@ approxIndexer(
char
*
s
;
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* just count them */
/*
empty -
just count them */
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
keys
=
(
struct
berval
**
)
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
...
...
@@ -1204,13 +1205,13 @@ int caseExactIndexer(
digest
.
bv_val
=
HASHdigest
;
digest
.
bv_len
=
sizeof
(
HASHdigest
);
/* we should have at least one value at this point */
assert
(
values
!=
NULL
&&
values
[
0
]
!=
NULL
);
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* just count them */
/*
empty -
just count them */
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
keys
=
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
slen
=
strlen
(
syntax
->
ssyn_oid
);
...
...
@@ -1320,15 +1321,15 @@ int caseExactSubstringsIndexer(
digest
.
bv_val
=
HASHdigest
;
digest
.
bv_len
=
sizeof
(
HASHdigest
);
/* we should have at least one value at this point */
assert
(
values
!=
NULL
&&
values
[
0
]
!=
NULL
);
nkeys
=
0
;
/* create normalized copy of values */
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* empty */
/* empty
- just count them
*/
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
nvalues
=
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
nvalues
[
i
]
=
ber_bvstr
(
UTF8normalize
(
values
[
i
]
->
bv_val
,
...
...
@@ -1829,13 +1830,13 @@ int caseIgnoreIndexer(
digest
.
bv_val
=
HASHdigest
;
digest
.
bv_len
=
sizeof
(
HASHdigest
);
/* we should have at least one value at this point */
assert
(
values
!=
NULL
&&
values
[
0
]
!=
NULL
);
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* just count them */
/*
empty -
just count them */
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
keys
=
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
slen
=
strlen
(
syntax
->
ssyn_oid
);
...
...
@@ -1944,15 +1945,15 @@ int caseIgnoreSubstringsIndexer(
digest
.
bv_val
=
HASHdigest
;
digest
.
bv_len
=
sizeof
(
HASHdigest
);
/* we should have at least one value at this point */
assert
(
values
!=
NULL
&&
values
[
0
]
!=
NULL
);
nkeys
=
0
;
/* create normalized copy of values */
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* empty */
/* empty
- just count them
*/
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
nvalues
=
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
nvalues
[
i
]
=
ber_bvstr
(
UTF8normalize
(
values
[
i
]
->
bv_val
,
...
...
@@ -2674,13 +2675,13 @@ int caseExactIA5Indexer(
digest
.
bv_val
=
HASHdigest
;
digest
.
bv_len
=
sizeof
(
HASHdigest
);
/* we should have at least one value at this point */
assert
(
values
!=
NULL
&&
values
[
0
]
!=
NULL
);
for
(
i
=
0
;
values
[
i
]
!=
NULL
;
i
++
)
{
/* just count them */
/*
empty -
just count them */
}
/* we should have at least one value at this point */
assert
(
i
>
0
);
keys
=
ch_malloc
(
sizeof
(
struct
berval
*
)
*
(
i
+
1
)
);
slen
=
strlen
(
syntax
->
ssyn_oid
);
...
...
Write
Preview
Markdown
is supported
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