diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-08-13 02:46:54 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-08-13 02:46:54 +0300 |
commit | 93146616cf56a94fc2979cb978c7b451c5592594 (patch) | |
tree | db840e75ef2c08731e699b4eb44641ad6639c2ca /src/nxt_array.c | |
parent | 21ac95f17e70f2f20fe8e2a99bbe9cc7328a6e62 (diff) | |
download | unit-93146616cf56a94fc2979cb978c7b451c5592594.tar.gz unit-93146616cf56a94fc2979cb978c7b451c5592594.tar.bz2 |
Basic variables support.
Diffstat (limited to 'src/nxt_array.c')
-rw-r--r-- | src/nxt_array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_array.c b/src/nxt_array.c index 6fe9ad6a..1e13c22a 100644 --- a/src/nxt_array.c +++ b/src/nxt_array.c @@ -51,7 +51,7 @@ nxt_array_add(nxt_array_t *array) if (nalloc < 16) { /* Allocate new array twice larger than current. */ - new_alloc = nalloc * 2; + new_alloc = (nalloc == 0) ? 4 : nalloc * 2; } else { /* Allocate new array 1.5 times larger than current. */ |