From a90672fc3d571ce22711dd42b836faaddba0f76b Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 22 Apr 2018 20:22:46 +0300 Subject: undo: Silence PVS/V547: expression may be false on other system --- src/nvim/undo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 35857510fc..e1ae4b4cc0 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -972,7 +972,7 @@ static u_entry_T *unserialize_uep(bufinfo_T * bi, bool *error, char_u **array = NULL; if (uep->ue_size > 0) { - if ((size_t)uep->ue_size < SIZE_MAX / sizeof(char_u *)) { + if ((size_t)uep->ue_size < SIZE_MAX / sizeof(char_u *)) { // -V547 array = xmalloc(sizeof(char_u *) * (size_t)uep->ue_size); memset(array, 0, sizeof(char_u *) * (size_t)uep->ue_size); } @@ -1404,7 +1404,7 @@ void u_read_undo(char *name, char_u *hash, char_u *orig_name) // sequence numbers of the headers. // When there are no headers uhp_table is NULL. if (num_head > 0) { - if ((size_t)num_head < SIZE_MAX / sizeof(*uhp_table)) { + if ((size_t)num_head < SIZE_MAX / sizeof(*uhp_table)) { // -V547 uhp_table = xmalloc((size_t)num_head * sizeof(*uhp_table)); } } -- cgit