summaryrefslogtreecommitdiff
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-02 10:13:42 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-02 10:13:42 +0100
commitbdace838c67c1bd94e55e34270a8325933891466 (patch)
treecf80ca41305e4c04a2ccb293b6634b20fb235fbe /src/os_win32.c
parentd82a81cad93708a6c180e59119db4818cc38c1a9 (diff)
downloadvim-git-bdace838c67c1bd94e55e34270a8325933891466.tar.gz
patch 8.1.0989: various small code uglinessv8.1.0989
Problem: Various small code ugliness. Solution: Remove pointless NULL checks. Fix function calls. Fix typos. (Dominique Pelle, closes #4060)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 4ac5ebddb..df6f7db78 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2646,7 +2646,7 @@ mch_init(void)
if (cterm_normal_bg_color == 0)
cterm_normal_bg_color = ((g_attrCurrent >> 4) & 0xf) + 1;
- // Fg and Bg color index nunmber at startup
+ // Fg and Bg color index number at startup
g_color_index_fg = g_attrDefault & 0xf;
g_color_index_bg = (g_attrDefault >> 4) & 0xf;
@@ -4210,8 +4210,7 @@ vim_create_process(
(LPSTARTUPINFOW)si, /* Startup information */
pi); /* Process information */
vim_free(wcmd);
- if (wcwd != NULL)
- vim_free(wcwd);
+ vim_free(wcwd);
return ret;
}
fallback:
@@ -5312,8 +5311,8 @@ win32_build_env(dict_T *env, garray_T *gap, int is_terminal)
*((WCHAR*)gap->ga_data + gap->ga_len++) = wval[n];
*((WCHAR*)gap->ga_data + gap->ga_len++) = L'\0';
}
- if (wkey != NULL) vim_free(wkey);
- if (wval != NULL) vim_free(wval);
+ vim_free(wkey);
+ vim_free(wval);
}
}
}