From 789b81aa757cbba534636afe79919c2969544528 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 3 Jan 2002 20:05:29 +0000 Subject: [PATCH] Misc cleanup --- libraries/libldap/ftest.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libraries/libldap/ftest.c b/libraries/libldap/ftest.c index 6f9a227a18..120bce7a99 100644 --- a/libraries/libldap/ftest.c +++ b/libraries/libldap/ftest.c @@ -27,19 +27,21 @@ static int filter2ber( char *filter ); int usage() { fprintf( stderr, "usage:\n" - "\tftest [-d n] filter\n" ); + " ftest [-d n] filter\n" + " filter - RFC 2254 string representation of an " + "LDAP search filter\n" ); return EXIT_FAILURE; } int main( int argc, char *argv[] ) { - int i; + int c; int debug=0; char *filter=NULL; - while( (i = getopt( argc, argv, "Aa:Ss:" "d:" )) != EOF ) { - switch ( i ) { + while( (c = getopt( argc, argv, "d:" )) != EOF ) { + switch ( c ) { case 'd': debug = atoi( optarg ); break; @@ -65,10 +67,7 @@ main( int argc, char *argv[] ) } } - if( argc - optind > 1 ) { - return usage(); - - } else if ( argc - optind != 1 ) { + if ( argc - optind != 1 ) { return usage(); } -- 2.39.5