aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-02-14 05:49:35 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-02-14 05:49:35 +0100
commitb7f518cbfad2082e972b6e1bd0cac2b9e76f1b45 (patch)
tree56c36ec2cc58a0c1e775b57275abc8240195528f
parent969cc55993919530b2a96e30f02fe71711cab28a (diff)
downloadrneovim-b7f518cbfad2082e972b6e1bd0cac2b9e76f1b45.tar.gz
rneovim-b7f518cbfad2082e972b6e1bd0cac2b9e76f1b45.tar.bz2
rneovim-b7f518cbfad2082e972b6e1bd0cac2b9e76f1b45.zip
PVS/V1028: cast operands, not the result
-rw-r--r--src/nvim/garray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/garray.c b/src/nvim/garray.c
index 2d2af54c95..74fd9d89cb 100644
--- a/src/nvim/garray.c
+++ b/src/nvim/garray.c
@@ -91,8 +91,8 @@ void ga_grow(garray_T *gap, int n)
}
int new_maxlen = gap->ga_len + n;
- size_t new_size = (size_t)(gap->ga_itemsize * new_maxlen);
- size_t old_size = (size_t)(gap->ga_itemsize * gap->ga_maxlen);
+ size_t new_size = (size_t)gap->ga_itemsize * (size_t)new_maxlen;
+ size_t old_size = (size_t)gap->ga_itemsize * (size_t)gap->ga_maxlen;
// reallocate and clear the new memory
char *pp = xrealloc(gap->ga_data, new_size);