From f17ffeb925c33551dd8644f502b0f5b8cccfa5d8 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 26 Aug 2005 22:23:27 +0000 Subject: [PATCH] Rename label "leave" to "done". Tru64 5.1 alpha's turns "leave" into an exception handling keyword. --- servers/slapd/back-ldif/ldif.c | 6 +++--- servers/slapd/bconfig.c | 12 ++++++------ servers/slapd/config.c | 18 +++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/servers/slapd/back-ldif/ldif.c b/servers/slapd/back-ldif/ldif.c index 77ee590e58..61b8f2d012 100644 --- a/servers/slapd/back-ldif/ldif.c +++ b/servers/slapd/back-ldif/ldif.c @@ -346,7 +346,7 @@ static int r_enum_tree(enumCookie *ck, struct berval *path, } fd = 1; if ( rc ) - goto leave; + goto done; } else { /* Queueing up for tool mode */ if(ck->entries == NULL) { @@ -382,7 +382,7 @@ static int r_enum_tree(enumCookie *ck, struct berval *path, "=> ldif_enum_tree: failed to opendir %s (%d)\n", path->bv_val, errno, 0 ); } - goto leave; + goto done; } while(1) { @@ -453,7 +453,7 @@ static int r_enum_tree(enumCookie *ck, struct berval *path, free(ptr); } } -leave: +done: if ( fd ) entry_free( e ); return rc; } diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 8e9156cf37..379123ca99 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -3216,7 +3216,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs, i } if ( rc != LDAP_SUCCESS ) - goto leave; + goto done; /* Parse all the values and check for simple syntax errors before * performing any set actions. @@ -3236,7 +3236,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs, i */ rc = check_name_index( last, colst[0]->co_type, e, rs, renum ); if ( rc ) - goto leave; + goto done; init_config_argv( ca ); @@ -3248,7 +3248,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs, i ct = config_find_table( colst, nocs, a->a_desc ); if ( !ct ) continue; /* user data? */ rc = check_vals( ct, ca, a, 1 ); - if ( rc ) goto leave; + if ( rc ) goto done; } /* Basic syntax checks are OK. Do the actual settings. */ @@ -3266,7 +3266,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs, i rc = config_parse_add( ct, ca ); if ( rc ) { rc = LDAP_OTHER; - goto leave; + goto done; } } } @@ -3289,7 +3289,7 @@ ok: Debug(LDAP_DEBUG_ANY, "%s: %s (%s)!\n", ca->log, ca->msg, ca->argv[1] ); rc = LDAP_OTHER; - goto leave; + goto done; } } @@ -3313,7 +3313,7 @@ ok: last->ce_kids = ce; } -leave: +done: if ( rc ) { if ( (colst[0]->co_type == Cft_Database) && ca->be ) { if ( ca->be != frontendDB ) diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 40be0f7ba5..b1e5b18dd6 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -638,7 +638,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) ch_free( c->tline ); if ( fp_parse_line( c ) ) { rc = 1; - goto leave; + goto done; } if ( c->argc < 1 ) { @@ -647,7 +647,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) c->log, 0, 0); #ifdef SLAPD_CONF_UNKNOWN_BAILOUT rc = 1; - goto leave; + goto done; #else /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ continue; #endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ @@ -665,11 +665,11 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) Debug(LDAP_DEBUG_CONFIG, "%s: unknown user type <%s>\n", c->log, c->argv[0], 0); rc = 1; - goto leave; + goto done; } else if ( rc == ARG_BAD_CONF ) { rc = 1; - goto leave; + goto done; } } else if ( c->bi && !c->be ) { @@ -696,7 +696,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) #endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ default: rc = 1; - goto leave; + goto done; } } @@ -724,7 +724,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) #endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ default: rc = 1; - goto leave; + goto done; } } @@ -742,7 +742,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) #endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ default: rc = 1; - goto leave; + goto done; } } @@ -753,7 +753,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) c->log, *c->argv, 0); #ifdef SLAPD_CONF_UNKNOWN_BAILOUT rc = 1; - goto leave; + goto done; #else /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ continue; #endif /* ! SLAPD_CONF_UNKNOWN_BAILOUT */ @@ -762,7 +762,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) rc = 0; -leave: +done: ch_free(c->tline); fclose(fp); ch_free(c->argv);