From: Sang Seok Lim Date: Fri, 17 Sep 2004 16:49:38 +0000 (+0000) Subject: Bug Fix : removing problematic counter increment X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~530 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=452fc403dda0731bb71d13b0f76f25b6fd7f362b;p=openldap Bug Fix : removing problematic counter increment --- diff --git a/servers/slapd/component.c b/servers/slapd/component.c index 0a0b22f17e..75920a06e3 100644 --- a/servers/slapd/component.c +++ b/servers/slapd/component.c @@ -95,11 +95,8 @@ get_comp_filter ( Operation* op, struct berval* bv, ComponentFilter** filt, static void eat_whsp( ComponentAssertionValue* cav ) { - int count = 0; - for ( ; ; ) { - if ( cav->cav_ptr[count++] == ' ' ) cav->cav_ptr++; - else break; - } + while ( ( cav->cav_ptr <= cav->cav_end ) && ( *cav->cav_ptr == ' ' ) ) + cav->cav_ptr++; } static int