diff --git a/src/autocmd.c b/src/autocmd.c
index 55650b4..d81615b 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -517,9 +517,7 @@
 	}
 	vim_free(AUGROUP_NAME(i));
 	if (in_use)
-	{
 	    AUGROUP_NAME(i) = get_deleted_augroup();
-	}
 	else
 	    AUGROUP_NAME(i) = NULL;
     }
diff --git a/src/buffer.c b/src/buffer.c
index 6cfa41f..33a7c66 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1595,9 +1595,7 @@
     set_curbuf(buf, action);
 
     if (action == DOBUF_SPLIT)
-    {
 	RESET_BINDING(curwin);	/* reset 'scrollbind' and 'cursorbind' */
-    }
 
 #if defined(FEAT_EVAL)
     if (aborting())	    /* autocmds may abort script processing */
@@ -3054,9 +3052,8 @@
 	/* put "line 999" in column 40 or after the file name */
 	i = 40 - vim_strsize(IObuff);
 	do
-	{
 	    IObuff[len++] = ' ';
-	} while (--i > 0 && len < IOSIZE - 18);
+	while (--i > 0 && len < IOSIZE - 18);
 	vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
 		_("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
 					       : (long)buflist_findlnum(buf));
diff --git a/src/crypt_zip.c b/src/crypt_zip.c
index ed17d95..864812e 100644
--- a/src/crypt_zip.c
+++ b/src/crypt_zip.c
@@ -68,12 +68,12 @@
 /*
  * Update the encryption keys with the next byte of plain text.
  */
-#define UPDATE_KEYS_ZIP(keys, c) { \
+#define UPDATE_KEYS_ZIP(keys, c) do { \
     keys[0] = CRC32(keys[0], (c)); \
     keys[1] += keys[0] & 0xff; \
     keys[1] = keys[1] * 134775813L + 1; \
     keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
-}
+} while (0)
 
 /*
  * Initialize for encryption/decryption.
@@ -98,9 +98,7 @@
     zs->keys[1] = 591751049L;
     zs->keys[2] = 878082192L;
     for (p = key; *p != NUL; ++p)
-    {
 	UPDATE_KEYS_ZIP(zs->keys, (int)*p);
-    }
 }
 
 /*
diff --git a/src/dosinst.c b/src/dosinst.c
index 49a2fa4..2c05cf4 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -849,7 +849,7 @@
 	     * for MSDOS and NT.
 	     * The order of preference is:
 	     * 1. $VIMRUNTIME/vim.exe	    (user preference)
-	     * 2. $VIM/vim70/vim.exe	    (hard coded version)
+	     * 2. $VIM/vim81/vim.exe	    (hard coded version)
 	     * 3. installdir/vim.exe	    (hard coded install directory)
 	     */
 	    fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir);
@@ -1568,9 +1568,7 @@
 
 	for (i = 0; ERROR_SUCCESS == lRet
 			   && i < sizeof(openwith) / sizeof(openwith[0]); i++)
-	{
 	    lRet = reg_create_key_and_value(hRootKey, openwith[i], NULL, "", flag);
-	}
     }
 
     return lRet;
diff --git a/src/edit.c b/src/edit.c
index 0b5d0e8..d378cd1 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -5363,9 +5363,8 @@
 	if (end == NULL && vpeekc() == NUL)
 	    break;
 	do
-	{
 	    c = vgetc();
-	} while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+	while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
 	if (c == NUL || got_int)
 	    // When CTRL-C was encountered the typeahead will be flushed and we
 	    // won't get the end sequence.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 524031e..2eafe14 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3568,9 +3568,7 @@
 	    && argvars[2].v_type != VAR_UNKNOWN
 	    && tv_get_number_chk(&argvars[2], &error)
 	    && !error)
-    {
 	rettv_list_set(rettv, NULL);
-    }
 
     s = tv_get_string(&argvars[0]);
     if (*s == '%' || *s == '#' || *s == '<')
@@ -6081,9 +6079,7 @@
 	if (argvars[2].v_type != VAR_UNKNOWN)
 	{
 	    if (tv_get_number_chk(&argvars[2], &error))
-	    {
 		rettv_list_set(rettv, NULL);
-	    }
 	    if (argvars[3].v_type != VAR_UNKNOWN
 				    && tv_get_number_chk(&argvars[3], &error))
 		options |= WILD_ALLLINKS;
@@ -6137,9 +6133,7 @@
 	if (argvars[3].v_type != VAR_UNKNOWN)
 	{
 	    if (tv_get_number_chk(&argvars[3], &error))
-	    {
 		rettv_list_set(rettv, NULL);
-	    }
 	    if (argvars[4].v_type != VAR_UNKNOWN
 				    && tv_get_number_chk(&argvars[4], &error))
 		flags |= WILD_ALLLINKS;
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2544124..594abfc 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3361,9 +3361,7 @@
 	/* Change directories when the 'acd' option is set and the file name
 	 * got changed or set. */
 	if (eap->cmdidx == CMD_saveas || name_was_missing)
-	{
 	    DO_AUTOCHDIR;
-	}
     }
 
 theend:
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index b253e9b..88d03ee 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8407,9 +8407,7 @@
 		|| cmdmod.browse
 # endif
 	   )
-	{
 	    RESET_BINDING(curwin);
-	}
 	else
 	    do_check_scrollbind(FALSE);
 	do_exedit(eap, old_curwin);
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 3d38d2c..52eda33 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1029,9 +1029,8 @@
 	/* Get a character.  Ignore K_IGNORE and K_NOP, they should not do
 	 * anything, such as stop completion. */
 	do
-	{
 	    c = safe_vgetc();
-	} while (c == K_IGNORE || c == K_NOP);
+	while (c == K_IGNORE || c == K_NOP);
 
 	if (KeyTyped)
 	{
@@ -2833,9 +2832,8 @@
 		    if (*p == TAB)
 		    {
 			do
-			{
 			    msg_putchar(' ');
-			} while (++vcol % 8);
+			while (++vcol % 8);
 			++p;
 		    }
 		    else
@@ -2908,9 +2906,8 @@
 	{
 	    /* Don't use chartabsize(), 'ts' can be different */
 	    do
-	    {
 		msg_putchar(' ');
-	    } while (++vcol % 8);
+	    while (++vcol % 8);
 	}
 	else
 	{
diff --git a/src/getchar.c b/src/getchar.c
index 0e9942b..e8926d4 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1813,9 +1813,8 @@
     int c;
 
     do
-    {
 	c = safe_vgetc();
-    } while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+    while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
 
     if (c == K_PS)
 	/* Only handle the first pasted character.  Drop the rest, since we
diff --git a/src/gui.c b/src/gui.c
index ada338f..15974e5 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3508,9 +3508,7 @@
 		else
 		{
 		    FOR_ALL_WINDOWS(wp)
-		    {
 			gui_do_scrollbar(wp, i, gui.which_scrollbars[i]);
-		    }
 		}
 		if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
 		{
@@ -3830,9 +3828,7 @@
 	else
 	{
 	    FOR_ALL_WINDOWS(wp)
-	    {
 		gui_do_scrollbar(wp, i, FALSE);
-	    }
 	}
 	curtab->tp_prev_which_scrollbars[i] = -1;
     }
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index ba8fd9d..126eaf0 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -2573,9 +2573,7 @@
     nonempty = (entry_text[0] != '\0');
 
     if (dialog == find_widgets.dialog)
-    {
 	gtk_widget_set_sensitive(find_widgets.find, nonempty);
-    }
 
     if (dialog == repl_widgets.dialog)
     {
diff --git a/src/gui_mac.c b/src/gui_mac.c
index bfecf81..c177ee6 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -360,9 +360,7 @@
 	for (c = Cstring, p = PascalString+1, len = 0; (*c != 0) && (len < 255); c++)
 	{
 	    if ((*c == '\\') && (c[1] != 0))
-	    {
 		c++;
-	    }
 	    *p = *c;
 	    p++;
 	    len++;
@@ -1259,25 +1257,19 @@
     error = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
 		    NewAEEventHandlerUPP(Handle_aevt_oapp_AE), 0, false);
     if (error)
-    {
 	return error;
-    }
 
     /* install quit application handler */
     error = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
 		    NewAEEventHandlerUPP(Handle_aevt_quit_AE), 0, false);
     if (error)
-    {
 	return error;
-    }
 
     /* install open document handler */
     error = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
 		    NewAEEventHandlerUPP(HandleODocAE), 0, false);
     if (error)
-    {
 	return error;
-    }
 
     /* install print document handler */
     error = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,
@@ -1331,15 +1323,11 @@
     error = AEInstallEventHandler('KAHL', 'GTTX',
 		    NewAEEventHandlerUPP(Handle_KAHL_GTTX_AE), 0, false);
     if (error)
-    {
 	return error;
-    }
     error = AEInstallEventHandler('KAHL', 'SRCH',
 		    NewAEEventHandlerUPP(Handle_KAHL_SRCH_AE), 0, false);
     if (error)
-    {
 	return error;
-    }
     error = AEInstallEventHandler('KAHL', 'MOD ',
 		    NewAEEventHandlerUPP(Handle_KAHL_MOD_AE), 0, false);
 #endif
@@ -3857,9 +3845,7 @@
     /*  SelectFont(hdc, gui.currFont); */
 
 	if (flags & DRAW_TRANSP)
-	{
 	    TextMode(srcOr);
-	}
 
 	MoveTo(TEXT_X(col), TEXT_Y(row));
 	DrawText((char *)s, 0, len);
@@ -3939,9 +3925,7 @@
 
 	/*  SelectFont(hdc, gui.currFont); */
 	if (flags & DRAW_TRANSP)
-	{
 	    TextMode(srcOr);
-	}
 
 	MoveTo(TEXT_X(col), TEXT_Y(row));
 
@@ -4620,13 +4604,9 @@
     GetWindowBounds(gui.VimWindow, kWindowGlobalPortRgn, &VimBound);
 
     if (gui.which_scrollbars[SBAR_LEFT])
-    {
 	VimBound.left = -gui.scrollbar_width + 1;
-    }
     else
-    {
 	VimBound.left = 0;
-    }
 
     SetWindowBounds(gui.VimWindow, kWindowGlobalPortRgn, &VimBound);
 
@@ -5675,9 +5655,8 @@
 
     /* Hang until one of the button is hit */
     do
-    {
 	ModalDialog(dialogUPP, &itemHit);
-    } while ((itemHit < 1) || (itemHit > lastButton));
+    while ((itemHit < 1) || (itemHit > lastButton));
 
 #ifdef USE_CARBONKEYHANDLER
     dialog_busy = FALSE;
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 6eb618f..4217339 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -916,13 +916,9 @@
 # endif
 	{
 	    if (gui.menu_bg_pixel != INVALCOLOR)
-	    {
 		XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++;
-	    }
 	    if (gui.menu_fg_pixel != INVALCOLOR)
-	    {
 		XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++;
-	    }
 	    menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu",
 								      arg, n);
 	    menu->id = (Widget)0;
@@ -1243,9 +1239,7 @@
     else
     {
 	if (menu->xpm_fname != NULL)
-	{
 	    XtSetArg(args[n], XmNpixmapFile, menu->xpm_fname); n++;
-	}
 	XtSetArg(args[n], XmNpixmapData, menu->xpm); n++;
 	XtSetArg(args[n], XmNlabelLocation, XmBOTTOM); n++;
     }
diff --git a/src/gui_photon.c b/src/gui_photon.c
index 9401228..d773185 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -451,9 +451,7 @@
 
     /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
     if (key->key_flags & Pk_KF_Compose)
-    {
 	return Pt_CONTINUE;
-    }
 
     if ((key->key_flags & Pk_KF_Cap_Valid) &&
 	    PkIsKeyDown(key->key_flags))
@@ -1011,9 +1009,7 @@
 	    for (i = 0; i < num_panels; i++)
 	    {
 		if (STRCMP(panel_titles[ i ], name) != 0)
-		{
 		    *s++ = panel_titles[ i ];
-		}
 	    }
 	    num_panels--;
 
@@ -1334,9 +1330,7 @@
 
     PtAppAddWorkProc(NULL, exit_gui_mch_update, &working);
     while ((working == TRUE) && !vim_is_input_buf_full())
-    {
 	PtProcessEvent();
-    }
 }
 
     int
@@ -2408,9 +2402,7 @@
 
     if (menu->iconidx >= 0 &&
 	    (menu->iconidx < ARRAY_LENGTH(gui_ph_toolbar_images)))
-    {
 	return gui_ph_toolbar_images[menu->iconidx];
-    }
 
     return NULL;
 }
diff --git a/src/gui_w32.c b/src/gui_w32.c
index c4bc3c9..292fbdd 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1155,9 +1155,7 @@
     /* If the OS is Windows NT, and 'encoding' differs from active codepage:
      * convert text from wide string. */
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
-    {
 	findrep_wtoa(&s_findrep_struct, &s_findrep_struct_w);
-    }
 
     if (s_findrep_struct.Flags & FR_DIALOGTERM)
 	/* Give main window the focus back. */
@@ -2633,9 +2631,7 @@
 	    }
 	}
 	if (wstr == NULL)
-	{
 	    TabCtrl_SetItem(s_tabhwnd, nr, &tie);
-	}
     }
 
     /* Remove any old labels. */
@@ -4289,9 +4285,7 @@
     }
 
     if (fix_window && menu_height != old_menu_height)
-    {
 	gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
-    }
     old_menu_height = menu_height;
 
     return menu_height;
@@ -4861,9 +4855,7 @@
     default:
 #ifdef MSWIN_FIND_REPLACE
 	if (uMsg == s_findrep_msg && s_findrep_msg != 0)
-	{
 	    _OnFindRepl();
-	}
 #endif
 	return MyWindowProc(hwnd, uMsg, wParam, lParam);
     }
diff --git a/src/gui_x11.c b/src/gui_x11.c
index ad91a21..6ff1644 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -3015,9 +3015,7 @@
 
     if (e->type == PropertyNotify && e->window == commWindow
 	    && e->atom == commProperty &&  e->state == PropertyNewValue)
-    {
 	serverEventProc(gui.dpy, event, 0);
-    }
 }
 #endif
 
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 27925af..a35d000 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -3805,9 +3805,7 @@
 	    Scheme_Object *item = SCHEME_CAR(requested_access);
 	    if (scheme_eq(item, M_write) || scheme_eq(item, M_read)
 		    || scheme_eq(item, M_execute) || scheme_eq(item, M_delete))
-	    {
 		raise_vim_exn(_("not allowed in the Vim sandbox"));
-	    }
 	    requested_access = SCHEME_CDR(requested_access);
 	}
     }
diff --git a/src/if_python3.c b/src/if_python3.c
index e8ab44f..d93d633 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1236,9 +1236,7 @@
 	      (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
 	      &start, &stop,
 	      &step, &slicelen) < 0)
-	{
 	    return NULL;
-	}
 	return BufferSlice((BufferObject *)(self), start, stop);
     }
     else
@@ -1268,9 +1266,7 @@
 	      (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
 	      &start, &stop,
 	      &step, &slicelen) < 0)
-	{
 	    return -1;
-	}
 	return RBAsSlice((BufferObject *)(self), start, stop, val, 1,
 			  (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count,
 			  NULL);
@@ -1352,9 +1348,7 @@
 		((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
 		&start, &stop,
 		&step, &slicelen) < 0)
-	{
 	    return NULL;
-	}
 	return RangeSlice((RangeObject *)(self), start, stop);
     }
     else
@@ -1371,7 +1365,8 @@
     {
 	long n = PyLong_AsLong(idx);
 	return RangeAsItem(self, n, val);
-    } else if (PySlice_Check(idx))
+    }
+    else if (PySlice_Check(idx))
     {
 	Py_ssize_t start, stop, step, slicelen;
 
@@ -1379,9 +1374,7 @@
 		((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
 		&start, &stop,
 		&step, &slicelen) < 0)
-	{
 	    return -1;
-	}
 	return RangeAsSlice(self, start, stop, val);
     }
     else
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 63294f4..2727524 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -846,9 +846,7 @@
 	enc = rb_enc_find((char *)sval);
 	vim_free(sval);
 	if (enc)
-	{
 	    return rb_enc_str_new(s, (long)strlen(s), enc);
-	}
     }
 #endif
     return rb_str_new2(s);
@@ -1171,9 +1169,7 @@
 	if (list != NULL)
 	{
 	    for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
-	    {
 		rb_ary_push(result, vim_to_ruby(&curr->li_tv));
-	    }
 	}
     }
     else if (tv->v_type == VAR_DICT)
@@ -1227,9 +1223,7 @@
 
     tv = eval_expr((char_u *)StringValuePtr(str), NULL);
     if (tv == NULL)
-    {
 	return Qnil;
-    }
     result = vim_to_ruby(tv);
 
     free_tv(tv);
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 46378a2..a5b80d4 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -811,9 +811,7 @@
 
 	    pos = NULL;
 	    if (line[0] != '\0'  &&  line[1] == '\0')
-	    {
 		pos = getmark(line[0], FALSE);
-	    }
 	    if (pos == NULL)
 	    {
 		Tcl_SetResult(interp, _("invalid mark name"), TCL_STATIC);
@@ -1529,9 +1527,7 @@
 	if (reflist->interp == interp && reflist->vimobj == vimobj)
 	{
 	    if (reflist->delcmd)
-	    {
 		Tcl_DecrRefCount(reflist->delcmd);
-	    }
 	    Tcl_IncrRefCount(delcmd);
 	    reflist->delcmd = delcmd;
 	    return TCL_OK;
diff --git a/src/indent.c b/src/indent.c
index 1ffa766..893ca29 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -3870,9 +3870,7 @@
 	    // this must be the if that we want!
 	    // match the indent level of that if.
 	    if (elselevel <= 0 && whilelevel <= 0)
-	    {
 		return OK;
-	    }
 	}
     }
     return FAIL;
diff --git a/src/insexpand.c b/src/insexpand.c
index c646674..6373993 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2606,9 +2606,7 @@
 		    TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
 		    | (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
 		    TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
-	    {
 		ins_compl_add_matches(num_matches, matches, p_ic);
-	    }
 	    p_ic = save_p_ic;
 	    break;
 
diff --git a/src/libvterm/src/pen.c b/src/libvterm/src/pen.c
index b780095..7d8cdc3 100644
--- a/src/libvterm/src/pen.c
+++ b/src/libvterm/src/pen.c
@@ -385,12 +385,13 @@
       break;
     }
 
-    if(!done)
+    if (!done)
     {
       DEBUG_LOG1("libvterm: Unhandled CSI SGR %lu\n", arg);
     }
 
-    while(CSI_ARG_HAS_MORE(args[argi++]));
+    while (CSI_ARG_HAS_MORE(args[argi++]))
+      ;
   }
 }
 
diff --git a/src/macros.h b/src/macros.h
index 510be9b..571fed0 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -32,7 +32,7 @@
 		       ? (a)->col < (b)->col \
 		       : (a)->coladd < (b)->coladd)
 #define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd))
-#define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;}
+#define CLEAR_POS(a) do {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} while (0)
 
 #define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
 
@@ -240,7 +240,7 @@
 /* get length of multi-byte char, not including composing chars */
 #define MB_CPTR2LEN(p)	    (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
 
-#define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
+#define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++; } while (0)
 #define MB_CHARLEN(p)	    (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
 #define MB_CHAR2LEN(c)	    (has_mbyte ? mb_char2len(c) : 1)
 #define PTR2CHAR(p)	    (has_mbyte ? mb_ptr2char(p) : (int)*(p))
@@ -251,7 +251,8 @@
 # define DO_AUTOCHDIR do { /**/ } while (0)
 #endif
 
-#define RESET_BINDING(wp)  (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE
+#define RESET_BINDING(wp)  do { (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE; \
+			    } while (0)
 
 #ifdef FEAT_DIFF
 # define PLINES_NOFILL(x) plines_nofill(x)
diff --git a/src/memline.c b/src/memline.c
index 66be0f3..6e5d3f2 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1359,9 +1359,7 @@
 	    && ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1
 		    && org_stat.st_mtime > swp_stat.st_mtime)
 		|| org_stat.st_mtime != mtime))
-    {
 	emsg(_("E308: Warning: Original file may have been changed"));
-    }
     out_flush();
 
     /* Get the 'fileformat' and 'fileencoding' from block zero. */
@@ -5307,9 +5305,7 @@
 	     curix < buf->b_ml.ml_usedchunks - 1
 	     && line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines;
 	     curix++)
-	{
 	    curline += buf->b_ml.ml_chunksize[curix].mlcs_numlines;
-	}
     }
     else if (curix < buf->b_ml.ml_usedchunks - 1
 	      && line >= curline + buf->b_ml.ml_chunksize[curix].mlcs_numlines)
diff --git a/src/menu.c b/src/menu.c
index 41669ed..f71ede9 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1701,9 +1701,7 @@
     {
 	mch_memmove(p + 5 + mode_chars_len, p + 5, (size_t)(len - 4));
 	for (i = 0; i < mode_chars_len; ++i)
-	{
 	    p[5 + i] = menu_mode_chars[idx][i];
-	}
     }
     return p;
 }
@@ -1889,9 +1887,7 @@
 {
 #ifdef FEAT_TERMINAL
     if (term_use_loop())
-    {
 	return MENU_INDEX_TERMINAL;
-    }
 #endif
     if (VIsual_active)
     {
diff --git a/src/misc1.c b/src/misc1.c
index 5781aa5..960f638 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1949,9 +1949,7 @@
 	    string = vim_strchr(part_buf, ':');
 	    if (string == NULL)	/* If everything is fine, this cannot actually
 				 * happen. */
-	    {
 		continue;
-	    }
 	    *string++ = NUL;	/* Isolate flags from string. */
 	    com_leader = string;
 
@@ -4093,9 +4091,7 @@
 			    || (*src == '%' && *tail != '%')
 #endif
 			    ))
-		    {
 			*var++ = *tail++;
-		    }
 		}
 
 #if defined(MSWIN) || defined(UNIX)
diff --git a/src/move.c b/src/move.c
index e678b87..232a875 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1614,9 +1614,7 @@
 	    lp->height = 1;
 	else
 #endif
-	{
 	    lp->height = PLINES_NOFILL(lp->lnum);
-	}
     }
 }
 
diff --git a/src/netbeans.c b/src/netbeans.c
index e49797a..7c2ab42 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -1509,9 +1509,7 @@
 	    long savedChars = atol((char *)args);
 
 	    if (buf == NULL || buf->bufp == NULL)
-	    {
 		nbdebug(("    invalid buffer identifier in saveDone\n"));
-	    }
 	    else
 		print_save_msg(buf, savedChars);
 /* =====================================================================*/
@@ -1990,9 +1988,7 @@
 	    args = (char_u *)cp;
 # ifdef NBDEBUG
 	    if (vim_ignored != -1)
-	    {
 		nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
-	    }
 # endif
 	    if (serNum >= GUARDEDOFFSET)
 	    {
diff --git a/src/normal.c b/src/normal.c
index f99c7e3..6b3a78b 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -811,9 +811,7 @@
 	    }
 	    else if ((nv_cmds[idx].cmd_flags & NV_SSS)
 					       && (mod_mask & MOD_MASK_SHIFT))
-	    {
 		mod_mask &= ~MOD_MASK_SHIFT;
-	    }
 	}
     }
 
@@ -3507,9 +3505,7 @@
 			&& col <= (int)startcol
 			&& find_is_eval_item(ptr + col, &col, &bn, FORWARD))
 		)
-	{
 	    ++col;
-	}
 
     return col;
 }
@@ -4329,9 +4325,7 @@
 	 * inside a comment, continue searching.  For K&R style function
 	 * declarations this skips the function header without types. */
 	if (!valid)
-	{
 	    CLEAR_POS(&found_pos);
-	}
 	else
 	    found_pos = curwin->w_cursor;
 	/* Remove SEARCH_START from flags to avoid getting stuck at one
@@ -9449,9 +9443,7 @@
 	v_swap_corners(cap->cmdchar);
 #ifdef FEAT_JOB_CHANNEL
     else if (bt_prompt(curbuf))
-    {
 	clearopbeep(cap->oap);
-    }
 #endif
     else
 	n_opencmd(cap);
diff --git a/src/ops.c b/src/ops.c
index 1b39c3f..e939f04 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -259,9 +259,7 @@
 #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT)
 	    if (first_char != '#' || !preprocs_left())
 #endif
-	{
 	    shift_line(oap->op_type == OP_LSHIFT, p_sr, amount, FALSE);
-	}
 	++curwin->w_cursor.lnum;
     }
 
@@ -3157,9 +3155,7 @@
 		    if (startcol > endcol || is_oneChar)
 			bd.textlen = 0;
 		    else
-		    {
 			bd.textlen = endcol - startcol + oap->inclusive;
-		    }
 		    bd.textstart = p + startcol;
 		    if (yank_copy_line(&bd, y_idx) == FAIL)
 			goto fail;
@@ -4391,9 +4387,7 @@
     {
 	if (*comment_flags == COM_END
 		|| *comment_flags == ':')
-	{
 	    break;
-	}
 	++comment_flags;
     }
 
@@ -5851,9 +5845,7 @@
 	    goto theend;
 	ptr = buf1;
 	if (negative && (!visual || was_positive))
-	{
 	    *ptr++ = '-';
-	}
 	if (pre)
 	{
 	    *ptr++ = '0';
diff --git a/src/option.c b/src/option.c
index 8149521..d1fdcc1 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6058,9 +6058,7 @@
 		|| sandbox != 0
 #endif
 		) && (options[opt_idx].flags & P_SECURE))
-    {
 	errmsg = e_secure;
-    }
 
     // Check for a "normal" directory or file name in some options.  Disallow a
     // path separator (slash and/or backslash), wildcards and characters that
@@ -6070,9 +6068,7 @@
 			    ? "/\\*?[|;&<>\r\n" : "/\\*?[<>\r\n")) != NULL)
 	  || ((options[opt_idx].flags & P_NDNAME)
 		    && vim_strpbrk(*varp, (char_u *)"*?[|;&<>\r\n") != NULL))
-    {
 	errmsg = e_invarg;
-    }
 
     /* 'term' */
     else if (varp == &T_NAME)
@@ -6722,9 +6718,7 @@
 		break;
 	    }
 	    if (*s == 'n')	/* name is always last one */
-	    {
 		break;
-	    }
 	    else if (*s == 'r') /* skip until next ',' */
 	    {
 		while (*++s && *s != ',')
@@ -8318,9 +8312,7 @@
 
     /* 'compatible' */
     if ((int *)varp == &p_cp)
-    {
 	compatible_set();
-    }
 
 #ifdef FEAT_LANGMAP
     if ((int *)varp == &p_lrm)
@@ -8547,9 +8539,11 @@
 
     /* when 'textauto' is set or reset also change 'fileformats' */
     else if ((int *)varp == &p_ta)
+    {
 	set_string_option_direct((char_u *)"ffs", -1,
 				 p_ta ? (char_u *)DFLT_FFS_VIM : (char_u *)"",
 						     OPT_FREE | opt_flags, 0);
+    }
 
     /*
      * When 'lisp' option changes include/exclude '-' in
diff --git a/src/os_mswin.c b/src/os_mswin.c
index ad5b60f..bd70e84 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1123,9 +1123,7 @@
     BOOL    ret;
 
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
-    {
 	wp = enc_to_utf16(s, NULL);
-    }
     if (wp != NULL)
     {
 	ret = SetDlgItemTextW(hDlg, nIDDlgItem, wp);
@@ -1731,9 +1729,7 @@
     int		wlen = len;
 
     if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
-    {
 	wp = enc_to_utf16(p, &wlen);
-    }
     if (wp != NULL)
     {
 	int ret = FALSE;
diff --git a/src/os_qnx.c b/src/os_qnx.c
index b121f3d..8091599 100644
--- a/src/os_qnx.c
+++ b/src/os_qnx.c
@@ -95,9 +95,7 @@
 	}
 
 	if ((clip_text != NULL) && (clip_length > 0))
-	{
 	    clip_yank_selection(type, clip_text, clip_length, cbd);
-	}
 
 	PhClipboardPasteFinish(cbdata);
     }
diff --git a/src/os_unix.c b/src/os_unix.c
index b398297..8618499 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -6119,9 +6119,7 @@
 # endif
 # ifdef FEAT_MOUSE_GPM
 	if (gpm_idx >= 0 && (fds[gpm_idx].revents & POLLIN))
-	{
 	    *check_for_gpm = 1;
-	}
 # endif
 # ifdef USE_XSMP
 	if (xsmp_idx >= 0 && (fds[xsmp_idx].revents & (POLLIN | POLLHUP)))
diff --git a/src/os_win32.c b/src/os_win32.c
index 2912b0d..fe729d4 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2224,14 +2224,10 @@
     coord.Y = 0;
     if (!FillConsoleOutputCharacter(g_hConOut, ' ', NumCells,
 	    coord, &dummy))
-    {
 	return FALSE;
-    }
     if (!FillConsoleOutputAttribute(g_hConOut, wAttribute, NumCells,
 	    coord, &dummy))
-    {
 	return FALSE;
-    }
 
     return TRUE;
 }
@@ -2467,9 +2463,7 @@
 			cb->BufferSize,		/* dimensions of our buffer */
 			BufferCoord,		/* offset in our buffer */
 			&WriteRegion))		/* region to restore */
-	    {
 		return FALSE;
-	    }
 	}
     }
 
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 1e10635..af7994c 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1790,8 +1790,7 @@
 			if (*regparse == 'n')
 			    startc = (reg_string || emit_range
 					|| regparse[1] == '-') ? NL : NFA_NEWL;
-			else
-			    if  (*regparse == 'd'
+			else if (*regparse == 'd'
 				    || *regparse == 'o'
 				    || *regparse == 'x'
 				    || *regparse == 'u'
@@ -2919,14 +2918,10 @@
 	}
 # else
 	for (p2 = postfix; p2 < end; p2++)
-	{
 	    fprintf(df, "%d, ", *p2);
-	}
 	fprintf(df, "\nCurrent position is: ");
 	for (p2 = postfix; p2 <= p; p2 ++)
-	{
 	    fprintf(df, "%d, ", *p2);
-	}
 # endif
 	fprintf(df, "\n--------------------------\n");
 	fclose(df);
diff --git a/src/screen.c b/src/screen.c
index 455c335..e6bb335 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -232,9 +232,7 @@
     win_T	*wp;
 
     FOR_ALL_WINDOWS(wp)
-    {
 	redraw_win_later(wp, type);
-    }
     // This may be needed when switching tabs.
     if (must_redraw < type)
 	must_redraw = type;
@@ -3525,9 +3523,7 @@
 #endif
 	     virtual_active() ||
 	     (VIsual_active && wp->w_buffer == curwin->w_buffer)))
-	{
 	    vcol = v;
-	}
 
 	/* Handle a character that's not completely on the screen: Put ptr at
 	 * that character but skip the first few screen characters. */
@@ -10761,9 +10757,7 @@
 #endif
 #if defined(FEAT_STL_OPT)
     if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
-    {
 	redraw_custom_statusline(curwin);
-    }
     else
 #endif
 #ifdef FEAT_CMDL_INFO
diff --git a/src/spell.c b/src/spell.c
index a778896..99283fc 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -445,9 +445,8 @@
     if (spell_iswordp(mi.mi_fend, wp))
     {
 	do
-	{
 	    MB_PTR_ADV(mi.mi_fend);
-	} while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
+	while (*mi.mi_fend != NUL && spell_iswordp(mi.mi_fend, wp));
 
 	if (capcol != NULL && *capcol == 0 && wp->w_s->b_cap_prog != NULL)
 	{
@@ -1463,9 +1462,8 @@
 
     p = mip->mi_fend;
     do
-    {
 	MB_PTR_ADV(mip->mi_fend);
-    } while (*mip->mi_fend != NUL && spell_iswordp(mip->mi_fend, mip->mi_win));
+    while (*mip->mi_fend != NUL && spell_iswordp(mip->mi_fend, mip->mi_win));
 
     /* Include the non-word character so that we can check for the word end. */
     if (*mip->mi_fend != NUL)
diff --git a/src/terminal.c b/src/terminal.c
index 08df532..26e3deb 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -4199,9 +4199,7 @@
 		if (cell.width != prev_cell.width || !same_attr)
 		{
 		    if (cell.width == 2)
-		    {
 			fputs("*", fd);
-		    }
 		    else
 			fputs("+", fd);
 
diff --git a/src/version.c b/src/version.c
index a474472..063dea0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -776,6 +776,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1086,
+/**/
     1085,
 /**/
     1084,
