diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 8de757e1aa..2a569795c4 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -620,7 +620,7 @@ main( int argc, char **argv ) filtpattern = strdup( argv[optind++] ); } - if ( (argv[optind] != NULL) && (sortattr == NULL || *sortattr == '\0') ) { + if ( argv[optind] != NULL ) { attrs = &argv[optind]; }