diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index 4cf8fc664c..35f4691726 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -2443,7 +2443,7 @@ redr_statuscol: // New redraw either due to updated topline or reset skipcol. if (must_redraw != 0) { // Don't update for changes in buffer again. - int mod_set = curbuf->b_mod_set; + const bool mod_set = curbuf->b_mod_set; curbuf->b_mod_set = false; curs_columns(curwin, true); win_update(curwin); diff --git a/src/nvim/option.c b/src/nvim/option.c index 51403a0fe6..51adc0218a 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2393,7 +2393,7 @@ static const char *did_set_modified(optset_T *args) save_file_ff(buf); // Buffer is unchanged } redraw_titles(); - buf->b_modified_was_set = (int)args->os_newval.boolean; + buf->b_modified_was_set = !!(int)args->os_newval.boolean; return NULL; } diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 9c037af73b..78f2a53f7b 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -2316,7 +2316,7 @@ int find_tags(char *pat, int *num_matches, char ***matchesp, int flags, int minc // uncrustify:on - int help_save = curbuf->b_help; + const bool help_save = curbuf->b_help; findtags_state_init(&st, pat, flags, mincount); diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 86195d5ccd..5c6fd0cef4 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -382,7 +382,7 @@ int u_savecommon(buf_T *buf, linenr_T top, linenr_T bot, linenr_T newbot, bool r u_entry_T *prev_uep; linenr_T size = bot - top - 1; - // If buf->b_u_synced == true make a new header. + // If buf->b_u_synced is true make a new header. if (buf->b_u_synced) { // Need to create new entry in b_changelist. buf->b_new_change = true; @@ -1772,7 +1772,7 @@ void u_undo(int count) // If we get an undo command while executing a macro, we behave like the // original vi. If this happens twice in one macro the result will not // be compatible. - if (curbuf->b_u_synced == false) { + if (!curbuf->b_u_synced) { u_sync(true); count = 1; } @@ -1925,7 +1925,7 @@ void undo_time(int step, bool sec, bool file, bool absolute) } // First make sure the current undoable change is synced. - if (curbuf->b_u_synced == false) { + if (!curbuf->b_u_synced) { u_sync(true); }