diff options
author | ZyX <kp-pav@yandex.ru> | 2016-10-02 04:34:30 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:08:06 +0300 |
commit | b3672ae2fced4715963442d2e19048f8fadbe0b8 (patch) | |
tree | 87a674a959a32382349157d37471e414e158d274 /src | |
parent | 4f9e7844272335943c075b9444934f77d3cba234 (diff) | |
download | rneovim-b3672ae2fced4715963442d2e19048f8fadbe0b8.tar.gz rneovim-b3672ae2fced4715963442d2e19048f8fadbe0b8.tar.bz2 rneovim-b3672ae2fced4715963442d2e19048f8fadbe0b8.zip |
eval/typval: Add tv_list_equal() tests, compare NULL lists equal
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval/typval.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 746cbbfe1c..b0b95e955f 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -623,13 +623,12 @@ bool tv_list_equal(list_T *const l1, list_T *const l2, const bool ic, const bool recursive) FUNC_ATTR_WARN_UNUSED_RESULT { - if (l1 == NULL || l2 == NULL) { - // FIXME? compare empty list with NULL list equal - return false; - } if (l1 == l2) { return true; } + if (l1 == NULL || l2 == NULL) { + return false; + } if (tv_list_len(l1) != tv_list_len(l2)) { return false; } |