aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-25 20:42:22 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-26 07:27:50 -0400
commit58d6e2d3cc4c39f7a2c78a3060758bee31f831e4 (patch)
tree96ef5952cb63af458527d6554526a9d9c066897d
parentf60af8694b5fd7339e3b9883f6bc5be34852fd14 (diff)
downloadrneovim-58d6e2d3cc4c39f7a2c78a3060758bee31f831e4.tar.gz
rneovim-58d6e2d3cc4c39f7a2c78a3060758bee31f831e4.tar.bz2
rneovim-58d6e2d3cc4c39f7a2c78a3060758bee31f831e4.zip
lint
-rw-r--r--src/nvim/ex_docmd.c4
-rw-r--r--src/nvim/if_cscope.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 0e73d65432..aa76355bad 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -8609,7 +8609,7 @@ eval_vars (
case SPEC_PERC: /* '%': current file */
if (curbuf->b_fname == NULL) {
result = (char_u *)"";
- valid = 0; /* Must have ":p:h" to be valid */
+ valid = 0; // Must have ":p:h" to be valid
} else {
result = curbuf->b_fname;
tilde_file = STRCMP(result, "~") == 0;
@@ -8662,7 +8662,7 @@ eval_vars (
*lnump = ECMD_LAST;
if (buf->b_fname == NULL) {
result = (char_u *)"";
- valid = 0; /* Must have ":p:h" to be valid */
+ valid = 0; // Must have ":p:h" to be valid
} else {
result = buf->b_fname;
tilde_file = STRCMP(result, "~") == 0;
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index a033546394..84721ee96c 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -427,8 +427,9 @@ cs_add_common(
fbuf = (char_u *)fname;
(void)modify_fname((char_u *)":p", false, &usedlen,
(char_u **)&fname, &fbuf, &len);
- if (fname == NULL)
+ if (fname == NULL) {
goto add_err;
+ }
fname = (char *)vim_strnsave((char_u *)fname, len);
xfree(fbuf);
FileInfo file_info;