aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c2
-rw-r--r--src/nvim/memline.c4
-rw-r--r--src/nvim/option.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 52fafa6a21..bb17382f98 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -3484,7 +3484,7 @@ char *vim_gettempdir(void)
static int notfound = 0;
bool exists = false;
if (vim_tempdir == NULL || !(exists = os_isdir(vim_tempdir))) {
- if (vim_tempdir != NULL && !exists) {
+ if (vim_tempdir != NULL) {
notfound++;
if (notfound == 1) {
ELOG("tempdir disappeared (antivirus or broken cleanup job?): %s", vim_tempdir);
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 2528b5c0d3..cb58cbc86f 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -1366,9 +1366,7 @@ int recover_names(char *fname, bool do_list, list_T *ret_list, int nr, char **fn
} else if (ret_list != NULL) {
for (int i = 0; i < num_files; i++) {
char *name = concat_fnames(dir_name, files[i], true);
- if (name != NULL) {
- tv_list_append_allocated_string(ret_list, name);
- }
+ tv_list_append_allocated_string(ret_list, name);
}
} else {
file_count += num_files;
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 3b674ce726..aff824e9e2 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3257,8 +3257,7 @@ static void showoptions(bool all, int opt_flags)
} else {
varp = get_varp(p);
}
- if (varp != NULL
- && (all == 1 || (all == 0 && !optval_default(p, varp)))) {
+ if (varp != NULL && (all || !optval_default(p, varp))) {
int len;
if (opt_flags & OPT_ONECOLUMN) {
len = Columns;