summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-03-29 18:45:00 +0200
committerBoris Faure <billiob@gmail.com>2015-03-29 18:45:00 +0200
commit29cf9139510cfe44cc67078ad7cddad717196386 (patch)
tree5d5a05d88d3e296fe68d195bdc7b7c1f48bc2501 /src
parentd2ed3299021e86930aedd9f965d286fe0d301485 (diff)
termio: make code more readable. Closes CID1291865
Diffstat (limited to 'src')
-rw-r--r--src/bin/termio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index dc5c2dd..527def6 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -1947,7 +1947,7 @@ _sb_add(struct termio_sb *sb, const char *s, size_t len)
1947{ 1947{
1948 size_t new_len = sb->len + len; 1948 size_t new_len = sb->len + len;
1949 1949
1950 if (new_len >= sb->alloc) 1950 if ((new_len >= sb->alloc) || !sb->buf)
1951 { 1951 {
1952 size_t new_alloc = ((new_len + 15) / 16) * 24; 1952 size_t new_alloc = ((new_len + 15) / 16) * 24;
1953 char *new_buf; 1953 char *new_buf;