mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Minor code simplification in util.c
darcs-hash:20070324193801-ac50b-e45d88fd7de0204467a0f7d52b71ee323f4e3f0d.gz
This commit is contained in:
parent
94a483d46b
commit
65d99117aa
1 changed files with 2 additions and 8 deletions
10
util.c
10
util.c
|
@ -1358,17 +1358,11 @@ int b_append( buffer_t *b, const void *d, ssize_t len )
|
|||
return 0;
|
||||
}
|
||||
|
||||
if( len < 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if( b->length <= (b->used + len) )
|
||||
{
|
||||
size_t l = maxi( b->length*2,
|
||||
maxi( b->used+len+MIN_SIZE,MIN_SIZE));
|
||||
|
||||
b->used+len+MIN_SIZE );
|
||||
|
||||
void *d = realloc( b->buff, l );
|
||||
if( !d )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue