summaryrefslogtreecommitdiff
path: root/src/dosinst.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-10 18:47:20 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-10 18:47:20 +0200
commit6f4700233fd925fe122b851f937929fb5e5da707 (patch)
tree5c5397f70fc4a320ce0c38adba21a1de7ed7b10d /src/dosinst.c
parentd6b4f2dd760b425c63c359b9ff299f73448f8854 (diff)
downloadvim-git-6f4700233fd925fe122b851f937929fb5e5da707.tar.gz
patch 8.0.1688: some macros are used without a semicolonv8.0.1688
Problem: Some macros are used without a semicolon, causing auto-indent to be wrong. Solution: Use the do-while(0) trick. (Ozaki Kiichi, closes #2729)
Diffstat (limited to 'src/dosinst.c')
-rw-r--r--src/dosinst.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dosinst.c b/src/dosinst.c
index 6a12e3dc8..ae5517da9 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -23,7 +23,14 @@
#define GVIMEXT32_PATH "GvimExt32\\gvimext.dll"
/* Macro to do an error check I was typing over and over */
-#define CHECK_REG_ERROR(code) if (code != ERROR_SUCCESS) { printf("%ld error number: %ld\n", (long)__LINE__, (long)code); return 1; }
+#define CHECK_REG_ERROR(code) \
+ do { \
+ if (code != ERROR_SUCCESS) \
+ { \
+ printf("%ld error number: %ld\n", (long)__LINE__, (long)code); \
+ return 1; \
+ } \
+ } while (0)
int has_vim = 0; /* installable vim.exe exists */
int has_gvim = 0; /* installable gvim.exe exists */