aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-17 18:19:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-17 18:19:18 +0100
commit3351b30b969716f83d9166025c6d940e7eedde5f (patch)
treecd8f11524a1c0609002e70a45a4c736e68676827 /src/lua
parentc0d2f5b0c3da61cbb03de38bc59b6c5279366428 (diff)
downloadrspamd-3351b30b969716f83d9166025c6d940e7eedde5f.tar.gz
rspamd-3351b30b969716f83d9166025c6d940e7eedde5f.zip
[Minor] Do not use floating point when extending buffers
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 0057dc472..461130157 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -2211,7 +2211,7 @@ lua_util_zstd_decompress (lua_State *L)
if (zin.pos < zin.size && zout.pos == zout.size) {
/* We need to extend output buffer */
- zout.size = zout.size * 1.5 + 1.0;
+ zout.size = zout.size * 2;
out = g_realloc (zout.dst, zout.size);
zout.dst = out;
}