Mercurial > vim
diff src/tag.c @ 16782:fc58fee685e2 v8.1.1393
patch 8.1.1393: unnecessary type casts
commit https://github.com/vim/vim/commit/51e14387f120392b74b84408cafec33942337a05
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 25 20:21:28 2019 +0200
patch 8.1.1393: unnecessary type casts
Problem: Unnecessary type casts.
Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 May 2019 20:30:06 +0200 |
parents | 695d9ef00b03 |
children | ce04ebdf26b8 |
line wrap: on
line diff
--- a/src/tag.c +++ b/src/tag.c @@ -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);