diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-14 21:04:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-14 21:04:11 -0700 |
commit | 244c24e0b295023e227f37f62dcab83c28c7614a (patch) | |
tree | 228fe3c389cd2178d8929206aedad1d0522d277a /buf.c | |
parent | a21bd3c948730709146a156702c6737568b0fa75 (diff) | |
download | txr-244c24e0b295023e227f37f62dcab83c28c7614a.tar.gz txr-244c24e0b295023e227f37f62dcab83c28c7614a.tar.bz2 txr-244c24e0b295023e227f37f62dcab83c28c7614a.zip |
buf: tiny code improvement.
* buf.c (buf_grow): Use the previously calculated delta value,
rather than re-evaluating the equivalent expression.
Diffstat (limited to 'buf.c')
-rw-r--r-- | buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,7 +142,7 @@ static void buf_grow(struct buf *b, val init_val, val self) while (size < len) { cnum delta = size / 4; if (INT_PTR_MAX - delta >= size) - size += size / 4; + size += delta; else size = len; } |