From: Howard Chu Date: Mon, 8 May 2006 13:12:12 +0000 (+0000) Subject: refine prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_1ALPHA~2^2~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aed92f35c1220bdc061437dbd79ccc4aa3a5a144;p=openldap refine prev commit --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 46be761d9f..c9601a3a10 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -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; }