mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
refine prev commit
This commit is contained in:
parent
f7115e761c
commit
aed92f35c1
@ -124,21 +124,21 @@ int slap_str2ad(
|
||||
}
|
||||
|
||||
static char *strchrlen(
|
||||
const char *p,
|
||||
const char *beg,
|
||||
const char *end,
|
||||
const char ch,
|
||||
int *len )
|
||||
{
|
||||
int i;
|
||||
const char *p;
|
||||
|
||||
for( i=0; *p && p < end; i++,p++ ) {
|
||||
for( p=beg; *p && p < end; p++ ) {
|
||||
if( *p == ch ) {
|
||||
*len = i;
|
||||
*len = p - beg;
|
||||
return (char *) p;
|
||||
}
|
||||
}
|
||||
|
||||
*len = i;
|
||||
*len = p - beg;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user