0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0989: various small code ugliness

Problem:    Various small code ugliness.
Solution:   Remove pointless NULL checks. Fix function calls. Fix typos.
            (Dominique Pelle, closes #4060)
This commit is contained in:
Bram Moolenaar
2019-03-02 10:13:42 +01:00
parent d82a81cad9
commit bdace838c6
16 changed files with 34 additions and 39 deletions

View File

@@ -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);
}
}
}