summaryrefslogtreecommitdiff
path: root/src/popupwin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-04 14:50:32 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-04 14:50:32 +0200
commit8d4ed11da635a1abe0ef2d795b4d48824c54d0e7 (patch)
tree2e6e32cb89174e28967a9cd9a9408c99c884a609 /src/popupwin.c
parentcde0ff39da2459b16007fef701ebaa449fb6fe9d (diff)
downloadvim-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.c20
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];
+ }
}
}
}