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:
@@ -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(): ");
|
||||
|
Reference in New Issue
Block a user