diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-16 11:37:39 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-16 11:37:39 +0300 |
commit | fab09ea0d6e8b8bd161c24341e6cdf64e80ae871 (patch) | |
tree | b6536106dcba3509c2debe7b8c51df14655c5370 | |
parent | d0850586df3dbf738542dac55b6329d6de1ad73b (diff) | |
download | rneovim-fab09ea0d6e8b8bd161c24341e6cdf64e80ae871.tar.gz rneovim-fab09ea0d6e8b8bd161c24341e6cdf64e80ae871.tar.bz2 rneovim-fab09ea0d6e8b8bd161c24341e6cdf64e80ae871.zip |
option: Silence PVS/V547: expression is true on 64-bit systems
-rw-r--r-- | src/nvim/option.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index f50d735e50..48fd797ee9 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -625,12 +625,12 @@ void set_init_1(void) opt_idx = findoption("maxmemtot"); if (opt_idx >= 0) { { - /* Use half of amount of memory available to Vim. */ - /* If too much to fit in uintptr_t, get uintptr_t max */ + // Use half of amount of memory available to Vim. + // If too much to fit in uintptr_t, get uintptr_t max. uint64_t available_kib = os_get_total_mem_kib(); - uintptr_t n = available_kib / 2 > UINTPTR_MAX - ? UINTPTR_MAX - : (uintptr_t)(available_kib /2); + uintptr_t n = (available_kib / 2 > UINTPTR_MAX // -V547 + ? UINTPTR_MAX + : (uintptr_t)(available_kib /2)); options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n; opt_idx = findoption("maxmem"); if (opt_idx >= 0) { |