From aed92f35c1220bdc061437dbd79ccc4aa3a5a144 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 8 May 2006 13:12:12 +0000 Subject: [PATCH] refine prev commit --- servers/slapd/ad.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.39.5