]> git.sur5r.net Git - openldap/commitdiff
Cleanup sss result string
authorHoward Chu <hyc@openldap.org>
Mon, 13 Jul 2009 08:28:11 +0000 (08:28 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 13 Jul 2009 08:28:11 +0000 (08:28 +0000)
clients/tools/common.c

index 4e63da0824a7dfc62bb6b6ae5e83c62827b762d3..0728b684949cf9aa17c3875ee22f7b5e723b45c2 100644 (file)
@@ -1941,8 +1941,8 @@ print_sss( LDAP *ld, LDAPControl *ctrl )
        rc = ldap_parse_sortresponse_control( ld, ctrl, &err, &attr );
        if ( rc == LDAP_SUCCESS ) {
                char buf[ BUFSIZ ];
-               rc = snprintf( buf, sizeof(buf), "(%d) %s %s",
-                       err, ldap_err2string(err), attr ? attr : "" );
+               rc = snprintf( buf, sizeof(buf), "(%d) %s%s%s",
+                       err, ldap_err2string(err), attr ? " " : "", attr ? attr : "" );
 
                tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
                        "sortResult", buf, rc );