minor cleanup

This commit is contained in:
Kurt Zeilenga 2000-10-18 00:24:58 +00:00
parent 26e3fc4625
commit 7beb6e4f89

View File

@ -211,17 +211,15 @@ ber_pvt_sb_grow_buffer( Sockbuf_Buf *buf, ber_len_t minsize )
assert( buf != NULL ); assert( buf != NULL );
for ( pw = MIN_BUFF_SIZE; pw < minsize; pw <<= 1 ) { for ( pw = MIN_BUFF_SIZE; pw < minsize; pw <<= 1 ) {
if (pw > MAX_BUFF_SIZE) if (pw > MAX_BUFF_SIZE) return -1;
return -1; }
}
if ( buf->buf_size < pw ) { if ( buf->buf_size < pw ) {
p = LBER_REALLOC( buf->buf_base, pw ); p = LBER_REALLOC( buf->buf_base, pw );
if ( p == NULL ) if ( p == NULL ) return -1;
return -1;
buf->buf_base = p; buf->buf_base = p;
buf->buf_size = pw; buf->buf_size = pw;
} }
return 0; return 0;
} }