From 4586ede1abf2ce7ee7c80cea02f954fe3be19aec Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 9 Jun 2007 23:45:23 +0000 Subject: [PATCH] ITS#5007: Rename label "leave"; OSF1 pthread.h makes it as an exception keyword --- servers/slapd/back-bdb/id2entry.c | 8 ++++---- servers/slapd/back-bdb/tools.c | 6 +++--- servers/slapd/schema_check.c | 34 +++++++++++++++---------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/servers/slapd/back-bdb/id2entry.c b/servers/slapd/back-bdb/id2entry.c index 5c693c14a7..d7d4c9bb2d 100644 --- a/servers/slapd/back-bdb/id2entry.c +++ b/servers/slapd/back-bdb/id2entry.c @@ -128,19 +128,19 @@ int bdb_id2entry( data.ulen = data.dlen = sizeof(buf); data.data = buf; rc = cursor->c_get( cursor, &key, &data, DB_SET ); - if ( rc ) goto leave; + if ( rc ) goto finish; eh.bv.bv_val = buf; eh.bv.bv_len = data.size; rc = entry_header( &eh ); - if ( rc ) goto leave; + if ( rc ) goto finish; /* Get the size */ data.flags ^= DB_DBT_PARTIAL; data.ulen = 0; rc = cursor->c_get( cursor, &key, &data, DB_CURRENT ); - if ( rc != DB_BUFFER_SMALL ) goto leave; + if ( rc != DB_BUFFER_SMALL ) goto finish; /* Allocate a block and retrieve the data */ off = eh.data - eh.bv.bv_val; @@ -155,7 +155,7 @@ int bdb_id2entry( rc = cursor->c_get( cursor, &key, &data, DB_CURRENT ); -leave: +finish: cursor->c_close( cursor ); if( rc != 0 ) { diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 35e45f0383..7bf5725a89 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -284,7 +284,7 @@ Entry* bdb_tool_entry_get( BackendDB *be, ID id ) data.flags ^= DB_DBT_PARTIAL; data.ulen = 0; rc = cursor->c_get( cursor, &key, &data, DB_CURRENT ); - if ( rc != DB_BUFFER_SMALL ) goto leave; + if ( rc != DB_BUFFER_SMALL ) goto done; /* Allocate a block and retrieve the data */ eh.bv.bv_len = eh.nvals * sizeof( struct berval ) + data.size; @@ -297,7 +297,7 @@ Entry* bdb_tool_entry_get( BackendDB *be, ID id ) eh.data += eoff; rc = cursor->c_get( cursor, &key, &data, DB_CURRENT ); - if ( rc ) goto leave; + if ( rc ) goto done; #ifdef SLAP_ZONE_ALLOC /* FIXME: will add ctx later */ @@ -331,7 +331,7 @@ Entry* bdb_tool_entry_get( BackendDB *be, ID id ) } #endif } -leave: +done: return e; } diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index e3b76090e7..a5860d7dc9 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -172,7 +172,7 @@ entry_schema_check( e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } if( sc->soc_kind != LDAP_SCHEMA_STRUCTURAL ) { @@ -185,7 +185,7 @@ entry_schema_check( e->e_dn, textbuf, 0 ); rc = LDAP_OTHER; - goto leave; + goto done; } got_soc: @@ -199,7 +199,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } *text = textbuf; @@ -209,7 +209,7 @@ got_soc: "unrecognized objectClass '%s'", aoc->a_vals[0].bv_val ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } else if ( sc != slap_schema.si_oc_glue && sc != oc ) { snprintf( textbuf, textlen, @@ -217,7 +217,7 @@ got_soc: "from '%s' to '%s' not allowed", asc->a_vals[0].bv_val, oc->soc_cname.bv_val ); rc = LDAP_NO_OBJECT_CLASS_MODS; - goto leave; + goto done; } else if ( sc == slap_schema.si_oc_glue ) { sc = oc; } @@ -226,7 +226,7 @@ got_soc: if ( !is_entry_glue ( e ) ) { rc = entry_naming_check( e, manage, text, textbuf, textlen ); if( rc != LDAP_SUCCESS ) { - goto leave; + goto done; } } else { /* Glue Entry */ @@ -250,7 +250,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } if( cr->scr_required ) for( i=0; cr->scr_required[i]; i++ ) { @@ -274,7 +274,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } } @@ -299,7 +299,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } } } @@ -318,14 +318,14 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } if ( oc->soc_check ) { rc = (oc->soc_check)( op->o_bd, e, oc, text, textbuf, textlen ); if( rc != LDAP_SUCCESS ) { - goto leave; + goto done; } } @@ -365,7 +365,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } } @@ -408,7 +408,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } } @@ -423,7 +423,7 @@ got_soc: e->e_dn, textbuf, 0 ); rc = LDAP_OBJECT_CLASS_VIOLATION; - goto leave; + goto done; } if( oc == slap_schema.si_oc_extensibleObject ) { @@ -435,7 +435,7 @@ got_soc: if( extensible ) { *text = NULL; rc = LDAP_SUCCESS; - goto leave; + goto done; } /* check that each attr in the entry is allowed by some oc */ @@ -476,12 +476,12 @@ got_soc: "Entry (%s), %s\n", e->e_dn, textbuf, 0 ); - goto leave; + goto done; } } *text = NULL; -leave: +done: slap_sl_free( socs, op->o_tmpmemctx ); return rc; } -- 2.39.5