aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-28 06:32:07 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-28 06:45:22 +0800
commite6b7f70294f0e461e95621719c459c9765f07dc7 (patch)
treec856aff289deb8d81411ecad69f0534e3bacd2bb
parente0eebe3087f926097fbc6902b157c9007c012572 (diff)
downloadrneovim-e6b7f70294f0e461e95621719c459c9765f07dc7.tar.gz
rneovim-e6b7f70294f0e461e95621719c459c9765f07dc7.tar.bz2
rneovim-e6b7f70294f0e461e95621719c459c9765f07dc7.zip
vim-patch:9.0.0095: conditions are always true
Problem: Conditions are always true. Solution: Remove useless conditions. (closes vim/vim#10802) https://github.com/vim/vim/commit/122dea70073d140aa89212d344c3f62bd3b5b3fa
-rw-r--r--src/nvim/buffer.c4
-rw-r--r--src/nvim/indent_c.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 10ce893fe8..328a72476a 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -3470,7 +3470,7 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, int use_san
// Proceed character by character through the statusline format string
// fmt_p is the current position in the input buffer
- for (char *fmt_p = usefmt; *fmt_p;) {
+ for (char *fmt_p = usefmt; *fmt_p != NUL;) {
if (curitem == (int)stl_items_len) {
size_t new_len = stl_items_len * 3 / 2;
@@ -3484,7 +3484,7 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, int use_san
stl_items_len = new_len;
}
- if (*fmt_p != NUL && *fmt_p != '%') {
+ if (*fmt_p != '%') {
prevchar_isflag = prevchar_isitem = false;
}
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 3c74b4bd8d..b89ab19226 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -3569,7 +3569,7 @@ term_again:
// Are we at the start of a cpp base class declaration or
// constructor initialization? XXX
n = 0;
- if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{') {
+ if (curbuf->b_ind_cpp_baseclass != 0) {
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
l = get_cursor_line_ptr();
}