diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-04 14:50:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-04 14:50:32 +0200 |
commit | 8d4ed11da635a1abe0ef2d795b4d48824c54d0e7 (patch) | |
tree | 2e6e32cb89174e28967a9cd9a9408c99c884a609 /src/popupwin.c | |
parent | cde0ff39da2459b16007fef701ebaa449fb6fe9d (diff) | |
download | vim-git-8d4ed11da635a1abe0ef2d795b4d48824c54d0e7.tar.gz |
patch 8.2.0510: Coverity complains about using uninitialized variablev8.2.0510
Problem: Coverity complains about using uninitialized variable.
Solution: Assign a value to "scol". Move code inside NULL check.
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 3a0dcb96a..608db4c09 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -798,16 +798,16 @@ apply_general_options(win_T *wp, dict_T *dict) if (*str != NUL) wp->w_border_char[i] = mb_ptr2char(str); } - } - if (list->lv_len == 1) - for (i = 1; i < 8; ++i) - wp->w_border_char[i] = wp->w_border_char[0]; - if (list->lv_len == 2) - { - for (i = 4; i < 8; ++i) - wp->w_border_char[i] = wp->w_border_char[1]; - for (i = 1; i < 4; ++i) - wp->w_border_char[i] = wp->w_border_char[0]; + if (list->lv_len == 1) + for (i = 1; i < 8; ++i) + wp->w_border_char[i] = wp->w_border_char[0]; + if (list->lv_len == 2) + { + for (i = 4; i < 8; ++i) + wp->w_border_char[i] = wp->w_border_char[1]; + for (i = 1; i < 4; ++i) + wp->w_border_char[i] = wp->w_border_char[0]; + } } } } |