0
0
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:
Bram Moolenaar
2019-05-25 20:21:28 +02:00
parent 682725c141
commit 51e14387f1
31 changed files with 70 additions and 74 deletions

View File

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