From d6b31721bfadabf5eaa817321706d403ecfbf805 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 28 Jul 2019 22:55:08 -0400 Subject: vim-patch:8.1.1086: too many curly braces Problem: Too many curly braces. Solution: Remove curly braces where they are not needed. (Hirohito Higashi, closes vim/vim#3982) https://github.com/vim/vim/commit/abab0b0fdd6535969447b03a4fffc1947918cf6c Neovim code style requires the opposite. Add curly braces to minimize lint errors when applying Vim patches. --- src/nvim/macros.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/nvim/macros.h') diff --git a/src/nvim/macros.h b/src/nvim/macros.h index c758e000a9..f0c0bc2bc3 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -127,7 +127,11 @@ # define MB_CHAR2LEN(c) mb_char2len(c) # define PTR2CHAR(p) utf_ptr2char(p) -# 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) /// Calculate the length of a C array /// -- cgit