termio: make code more readable. Closes CID1291865
This commit is contained in:
parent
d2ed329902
commit
29cf913951
|
@ -1947,7 +1947,7 @@ _sb_add(struct termio_sb *sb, const char *s, size_t len)
|
|||
{
|
||||
size_t new_len = sb->len + len;
|
||||
|
||||
if (new_len >= sb->alloc)
|
||||
if ((new_len >= sb->alloc) || !sb->buf)
|
||||
{
|
||||
size_t new_alloc = ((new_len + 15) / 16) * 24;
|
||||
char *new_buf;
|
||||
|
|
Loading…
Reference in New Issue