From b4b0f388cb9124121d98f3d8051ca25e4fb77673 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 5 Mar 2009 19:26:35 +0000 Subject: [PATCH] Fix loop init --- tests/progs/slapd-modrdn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/progs/slapd-modrdn.c b/tests/progs/slapd-modrdn.c index e52816caaf..bc3da1c6f3 100644 --- a/tests/progs/slapd-modrdn.c +++ b/tests/progs/slapd-modrdn.c @@ -183,7 +183,7 @@ do_modrdn( char *uri, char *manager, int delay, int friendly, int chaserefs ) { LDAP *ld = NULL; - int i = 0, do_retry = maxretries; + int i, do_retry = maxretries; char *DNs[2]; char *rdns[2]; int rc = LDAP_SUCCESS; @@ -208,6 +208,8 @@ do_modrdn( char *uri, char *manager, rdns[0] = strdup( DNs[1] ); DNs[1][i] = ','; + i = 0; + retry:; ldap_initialize( &ld, uri ); if ( ld == NULL ) { -- 2.39.5