1
0
forked from aniani/vim

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

@@ -1430,7 +1430,7 @@ find_tagfunc_tags(
if (name_only)
mfp = vim_strsave(res_name);
else
mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
if (mfp == NULL)
continue;
@@ -2536,7 +2536,7 @@ parse_line:
*/
*tagp.tagname_end = NUL;
len = (int)(tagp.tagname_end - tagp.tagname);
mfp = (char_u *)alloc((int)sizeof(char_u)
mfp = (char_u *)alloc(sizeof(char_u)
+ len + 10 + ML_EXTRA + 1);
if (mfp != NULL)
{
@@ -2585,7 +2585,7 @@ parse_line:
else
{
len = (int)(tagp.tagname_end - tagp.tagname);
mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
if (mfp != NULL)
vim_strncpy(mfp, tagp.tagname, len);
@@ -2620,7 +2620,7 @@ parse_line:
else
++len;
#endif
mfp = (char_u *)alloc((int)sizeof(char_u) + len + 1);
mfp = (char_u *)alloc(sizeof(char_u) + len + 1);
if (mfp != NULL)
{
p = mfp;
@@ -3346,7 +3346,7 @@ jumpto_tag(
/* Make a copy of the line, it can become invalid when an autocommand calls
* back here recursively. */
len = matching_line_len(lbuf_arg) + 1;
lbuf = alloc((int)len);
lbuf = alloc(len);
if (lbuf != NULL)
mch_memmove(lbuf, lbuf_arg, len);