]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit for empty attrs
authorHoward Chu <hyc@openldap.org>
Tue, 23 Sep 2003 11:29:20 +0000 (11:29 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 23 Sep 2003 11:29:20 +0000 (11:29 +0000)
clients/tools/ldapsearch.c

index 738a2049851e41fc1cdbb30427b78ca4d00d2518..047f055cf5d647b15709c80c68d282a14b3d231b 100644 (file)
@@ -1161,10 +1161,10 @@ print_entry(
        {
                if (bv.bv_val == NULL) break;
 
-               if ( attrsonly || !bvals ) {
+               if ( attrsonly ) {
                        write_ldif( LDIF_PUT_NOVALUE, bv.bv_val, NULL, 0 );
 
-               } else {
+               } else if ( bvals ) {
                        for ( i = 0; bvals[i].bv_val != NULL; i++ ) {
                                if ( vals2tmp > 1 || ( vals2tmp
                                        && ldif_is_not_printable( bvals[i].bv_val, bvals[i].bv_len ) ))