aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-03-13 15:11:17 +0100
committerGitHub <noreply@github.com>2022-03-13 22:11:17 +0800
commit4ba12b3dda34472c193c9fa8ffd7d3bd5b6c04d6 (patch)
treec281f75c93feb5d0789ee602484c22e3b6a83116 /src/nvim/indent.c
parent4ede2ea4b2e9cd61fb7e634fa35e6a500816be19 (diff)
downloadrneovim-4ba12b3dda34472c193c9fa8ffd7d3bd5b6c04d6.tar.gz
rneovim-4ba12b3dda34472c193c9fa8ffd7d3bd5b6c04d6.tar.bz2
rneovim-4ba12b3dda34472c193c9fa8ffd7d3bd5b6c04d6.zip
refactor: fix clint warnings (#17682)
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r--src/nvim/indent.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 8cc5bc2436..59ba2c92f7 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -70,7 +70,7 @@ int get_indent_str(const char_u *ptr, int ts, bool list)
{
int count = 0;
- for (; *ptr; ++ptr) {
+ for (; *ptr; ptr++) {
// Count a tab for what it is worth.
if (*ptr == TAB) {
if (!list || curwin->w_p_lcs_chars.tab1) {
@@ -442,10 +442,9 @@ int get_breakindent_win(win_T *wp, char_u *line)
static long *prev_vts = NULL; // Cached vartabs values.
int bri = 0;
// window width minus window margin space, i.e. what rests for text
- const int eff_wwidth = wp->w_width_inner
- - ((wp->w_p_nu || wp->w_p_rnu)
- && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
- ? number_width(wp) + 1 : 0);
+ const int eff_wwidth = wp->w_width_inner -
+ ((wp->w_p_nu || wp->w_p_rnu)
+ && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL) ? number_width(wp) + 1 : 0);
// used cached indent, unless pointer or 'tabstop' changed
if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts
@@ -512,7 +511,7 @@ int inindent(int extra)
char_u *ptr;
colnr_T col;
- for (col = 0, ptr = get_cursor_line_ptr(); ascii_iswhite(*ptr); ++col) {
+ for (col = 0, ptr = get_cursor_line_ptr(); ascii_iswhite(*ptr); col++) {
ptr++;
}
@@ -630,7 +629,7 @@ int get_lisp_indent(void)
continue;
}
- for (that = get_cursor_line_ptr(); *that != NUL; ++that) {
+ for (that = get_cursor_line_ptr(); *that != NUL; that++) {
if (*that == ';') {
while (*(that + 1) != NUL) {
that++;