From: Hallvard Furuseth Date: Mon, 2 Dec 2002 15:46:53 +0000 (+0000) Subject: Esthetic change: Move break; out of if() to before the next case: X-Git-Tag: NO_SLAP_OP_BLOCKS~743 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=334ff687d6f56c2bd3b7d00dd95aa60a616a2b5b;p=openldap Esthetic change: Move break; out of if() to before the next case: --- diff --git a/clients/tools/ldapcompare.c b/clients/tools/ldapcompare.c index 5286e156e9..46917ac9f9 100644 --- a/clients/tools/ldapcompare.c +++ b/clients/tools/ldapcompare.c @@ -216,8 +216,7 @@ main( int argc, char **argv ) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified\n"); @@ -230,8 +229,7 @@ main( int argc, char **argv ) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( noop ) { fprintf( stderr, "noop control previously specified\n"); @@ -244,13 +242,14 @@ main( int argc, char **argv ) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; + case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -406,7 +405,8 @@ main( int argc, char **argv ) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) { diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 8a1b2e37b3..e51c38461f 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -215,8 +215,7 @@ main( int argc, char **argv ) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified\n"); @@ -229,8 +228,7 @@ main( int argc, char **argv ) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( noop ) { fprintf( stderr, "noop control previously specified\n"); @@ -243,13 +241,13 @@ main( int argc, char **argv ) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -405,7 +403,8 @@ main( int argc, char **argv ) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) { diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index cddbf8192e..a131d4cab2 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -279,8 +279,7 @@ main( int argc, char **argv ) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified\n"); @@ -293,8 +292,7 @@ main( int argc, char **argv ) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( noop ) { fprintf( stderr, "noop control previously specified\n"); @@ -307,13 +305,13 @@ main( int argc, char **argv ) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -469,7 +467,8 @@ main( int argc, char **argv ) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) { diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index 4b1de065c5..3d18b92618 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -235,8 +235,7 @@ main(int argc, char **argv) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified\n"); @@ -249,8 +248,7 @@ main(int argc, char **argv) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( noop ) { fprintf( stderr, "noop control previously specified\n"); @@ -263,13 +261,13 @@ main(int argc, char **argv) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -425,7 +423,8 @@ main(int argc, char **argv) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) { diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index d9d20554a8..dace530506 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -235,8 +235,7 @@ main( int argc, char *argv[] ) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified\n"); @@ -249,8 +248,7 @@ main( int argc, char *argv[] ) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( cvalue != NULL ) { fprintf( stderr, "noop: no control value expected\n" ); @@ -259,13 +257,13 @@ main( int argc, char *argv[] ) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -421,7 +419,8 @@ main( int argc, char *argv[] ) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) { diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index c3eb3a440e..b26778a268 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -472,8 +472,7 @@ main( int argc, char **argv ) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified"); @@ -486,8 +485,7 @@ main( int argc, char **argv ) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( noop ) { fprintf( stderr, "noop control previously specified"); @@ -500,13 +498,13 @@ main( int argc, char **argv ) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -662,7 +660,8 @@ main( int argc, char **argv ) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) { diff --git a/clients/tools/ldapwhoami.c b/clients/tools/ldapwhoami.c index a770c015ba..12dda6f000 100644 --- a/clients/tools/ldapwhoami.c +++ b/clients/tools/ldapwhoami.c @@ -191,8 +191,7 @@ main( int argc, char *argv[] ) assert( authzid == NULL ); authzid = control; - break; - + } else if ( strcasecmp( control, "manageDSAit" ) == 0 ) { if( manageDSAit ) { fprintf( stderr, "manageDSAit control previously specified\n"); @@ -205,8 +204,7 @@ main( int argc, char *argv[] ) } manageDSAit = 1 + crit; - break; - + } else if ( strcasecmp( control, "noop" ) == 0 ) { if( noop ) { fprintf( stderr, "noop control previously specified\n"); @@ -219,13 +217,13 @@ main( int argc, char *argv[] ) } noop = 1 + crit; - break; } else { fprintf( stderr, "Invalid general control name: %s\n", control ); usage(prog); return EXIT_FAILURE; } + break; case 'h': /* ldap host */ if( ldapuri != NULL ) { fprintf( stderr, "%s: -h incompatible with -H\n", prog ); @@ -371,7 +369,8 @@ main( int argc, char *argv[] ) prog ); usage( prog ); return( EXIT_FAILURE ); - } break; + } + break; case 'Q': #ifdef HAVE_CYRUS_SASL if( version == LDAP_VERSION2 ) {