aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorkylo252 <59826753+kylo252@users.noreply.github.com>2022-05-26 04:49:25 +0200
committerGitHub <noreply@github.com>2022-05-26 10:49:25 +0800
commit7b952793d5c46e862a9cdec3d6ac4762370296ed (patch)
tree987ea7d0174b4df4a6aa19356237b08308b0e744 /src/nvim/fileio.c
parentf246a929e7abec4aba00ceb68b1492f3be5877dc (diff)
downloadrneovim-7b952793d5c46e862a9cdec3d6ac4762370296ed.tar.gz
rneovim-7b952793d5c46e862a9cdec3d6ac4762370296ed.tar.bz2
rneovim-7b952793d5c46e862a9cdec3d6ac4762370296ed.zip
refactor: missing parenthesis may cause unexpected problems (#17443)
related vim-8.2.{4402,4639}
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index e869a9a6de..8d8c10f823 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -2195,11 +2195,11 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en
linenr_T lnum;
long nchars;
#define SET_ERRMSG_NUM(num, msg) \
- errnum = num, errmsg = msg, errmsgarg = 0
+ errnum = (num), errmsg = (msg), errmsgarg = 0
#define SET_ERRMSG_ARG(msg, error) \
- errnum = NULL, errmsg = msg, errmsgarg = error
+ errnum = NULL, errmsg = (msg), errmsgarg = error
#define SET_ERRMSG(msg) \
- errnum = NULL, errmsg = msg, errmsgarg = 0
+ errnum = NULL, errmsg = (msg), errmsgarg = 0
const char *errnum = NULL;
char *errmsg = NULL;
int errmsgarg = 0;