0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1507: using malloc() directly

Problem:    Using malloc() directly.
Solution:   Use ALLOC_ONE().  Remove superfluous typecast.  (Hussam al-Homsi,
            closes #6768)
This commit is contained in:
Bram Moolenaar
2020-08-22 15:19:18 +02:00
parent d70840ed68
commit 51b6eb47b3
4 changed files with 8 additions and 6 deletions

View File

@@ -77,7 +77,7 @@ main(void)
if (cmdlen >= 2 && p[0] == L'"' && p[cmdlen - 1] == L'"')
{
cmdlen += 3;
cmd = (wchar_t *)malloc(cmdlen * sizeof(wchar_t));
cmd = malloc(cmdlen * sizeof(wchar_t));
if (cmd == NULL)
{
perror("vimrun malloc(): ");