mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.1393: unnecessary type casts
Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
This commit is contained in:
@@ -4816,7 +4816,7 @@ replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep)
|
||||
while ((pos = (char_u *)strstr((char *)pos + 2, "$*")) != NULL)
|
||||
++i;
|
||||
len = (int)STRLEN(p);
|
||||
new_cmdline = alloc((int)(STRLEN(program) + i * (len - 2) + 1));
|
||||
new_cmdline = alloc(STRLEN(program) + i * (len - 2) + 1);
|
||||
if (new_cmdline == NULL)
|
||||
return NULL; /* out of memory */
|
||||
ptr = new_cmdline;
|
||||
@@ -4832,7 +4832,7 @@ replace_makeprg(exarg_T *eap, char_u *p, char_u **cmdlinep)
|
||||
}
|
||||
else
|
||||
{
|
||||
new_cmdline = alloc((int)(STRLEN(program) + STRLEN(p) + 2));
|
||||
new_cmdline = alloc(STRLEN(program) + STRLEN(p) + 2);
|
||||
if (new_cmdline == NULL)
|
||||
return NULL; /* out of memory */
|
||||
STRCPY(new_cmdline, program);
|
||||
|
Reference in New Issue
Block a user