ITS#5105 from Alexey Melnikov @ isode

This commit is contained in:
Howard Chu 2007-08-24 21:58:20 +00:00
parent 30fbf95de1
commit 670febf7d5
2 changed files with 9 additions and 9 deletions

View File

@ -265,10 +265,10 @@ ber_dump(
len = ber_pvt_ber_write(ber);
}
sprintf( buf, "ber_dump: buf=0x%08lx ptr=0x%08lx end=0x%08lx len=%ld\n",
(long) ber->ber_buf,
(long) ber->ber_ptr,
(long) ber->ber_end,
sprintf( buf, "ber_dump: buf=%p ptr=%p end=%p len=%ld\n",
ber->ber_buf,
ber->ber_ptr,
ber->ber_end,
(long) len );
(void) (*ber_pvt_log_print)( buf );
@ -303,10 +303,10 @@ ber_sos_dump(
(*ber_pvt_log_print)( "*** sos dump ***\n" );
while ( sos != NULL ) {
sprintf( buf, "ber_sos_dump: clen %ld first 0x%lx ptr 0x%lx\n",
sprintf( buf, "ber_sos_dump: clen %ld first %p ptr %p\n",
(long) sos->sos_clen,
(long) sos->sos_first,
(long) sos->sos_ptr );
sos->sos_first,
sos->sos_ptr );
(*ber_pvt_log_print)( buf );
sprintf( buf, " current len %ld contents:\n",

View File

@ -419,7 +419,7 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
case BvOff:
*b->res.ba = ber_memalloc_x( (n+1) * b->siz, b->ber->ber_memctx );
if ( *b->res.ba == NULL ) return LBER_DEFAULT;
((struct berval *)((long)(*b->res.ba) + n*b->siz +
((struct berval *)((char *)(*b->res.ba) + n*b->siz +
b->off))->bv_val = NULL;
break;
}
@ -452,7 +452,7 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen )
*bvp = bv;
break;
case BvOff:
*(BerVarray)((long)(*b->res.ba)+n*b->siz+b->off) = bv;
*(BerVarray)((char *)(*b->res.ba)+n*b->siz+b->off) = bv;
break;
}
}