mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
silence warning; cleanup code
This commit is contained in:
parent
9abaf38d1f
commit
e3a2b273a4
@ -2036,22 +2036,15 @@ print_deref( LDAP *ld, LDAPControl *ctrl )
|
|||||||
if ( dv->vals != NULL ) {
|
if ( dv->vals != NULL ) {
|
||||||
int j;
|
int j;
|
||||||
for ( j = 0; dv->vals[ j ].bv_val != NULL; j++ ) {
|
for ( j = 0; dv->vals[ j ].bv_val != NULL; j++ ) {
|
||||||
int k;
|
int k = ldif_is_not_printable( dv->vals[ j ].bv_val, dv->vals[ j ].bv_len );
|
||||||
|
|
||||||
for ( k = 0; k < dv->vals[ j ].bv_len; k++ ) {
|
|
||||||
if ( !isprint( dv->vals[ j ].bv_val[k] ) ) {
|
|
||||||
k = -1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*ptr++ = '<';
|
*ptr++ = '<';
|
||||||
ptr = lutil_strcopy( ptr, dv->type );
|
ptr = lutil_strcopy( ptr, dv->type );
|
||||||
if ( k == -1 ) {
|
if ( k ) {
|
||||||
*ptr++ = ':';
|
*ptr++ = ':';
|
||||||
}
|
}
|
||||||
*ptr++ = '=';
|
*ptr++ = '=';
|
||||||
if ( k == -1 ) {
|
if ( k ) {
|
||||||
k = lutil_b64_ntop(
|
k = lutil_b64_ntop(
|
||||||
(unsigned char *) dv->vals[ j ].bv_val,
|
(unsigned char *) dv->vals[ j ].bv_val,
|
||||||
dv->vals[ j ].bv_len,
|
dv->vals[ j ].bv_len,
|
||||||
|
Loading…
Reference in New Issue
Block a user