mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
minor cleanup
This commit is contained in:
parent
26e3fc4625
commit
7beb6e4f89
@ -211,17 +211,15 @@ ber_pvt_sb_grow_buffer( Sockbuf_Buf *buf, ber_len_t minsize )
|
||||
assert( buf != NULL );
|
||||
|
||||
for ( pw = MIN_BUFF_SIZE; pw < minsize; pw <<= 1 ) {
|
||||
if (pw > MAX_BUFF_SIZE)
|
||||
return -1;
|
||||
}
|
||||
if (pw > MAX_BUFF_SIZE) return -1;
|
||||
}
|
||||
|
||||
if ( buf->buf_size < pw ) {
|
||||
p = LBER_REALLOC( buf->buf_base, pw );
|
||||
if ( p == NULL )
|
||||
return -1;
|
||||
if ( p == NULL ) return -1;
|
||||
buf->buf_base = p;
|
||||
buf->buf_size = pw;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user