Mercurial > vim
diff src/ex_eval.c @ 20830:9064044fd4f6 v8.2.0967
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Commit: https://github.com/vim/vim/commit/71ccd03ee8a43b20000214a9c99dcc90f039edca
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 12 22:59:11 2020 +0200
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Jun 2020 23:00:04 +0200 |
parents | 9f921ba86d05 |
children | 7ee565134d4a |
line wrap: on
line diff
--- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -439,7 +439,7 @@ get_exception_string( { cmdlen = (int)STRLEN(cmdname); ret = (char *)vim_strnsave((char_u *)"Vim(", - 4 + cmdlen + 2 + (int)STRLEN(mesg)); + 4 + cmdlen + 2 + STRLEN(mesg)); if (ret == NULL) return ret; STRCPY(&ret[4], cmdname); @@ -448,7 +448,7 @@ get_exception_string( } else { - ret = (char *)vim_strnsave((char_u *)"Vim:", 4 + (int)STRLEN(mesg)); + ret = (char *)vim_strnsave((char_u *)"Vim:", 4 + STRLEN(mesg)); if (ret == NULL) return ret; val = ret + 4; @@ -806,7 +806,7 @@ report_pending(int action, int pending, if (pending & CSTP_THROW) { vim_snprintf((char *)IObuff, IOSIZE, mesg, _("Exception")); - mesg = (char *)vim_strnsave(IObuff, (int)STRLEN(IObuff) + 4); + mesg = (char *)vim_strnsave(IObuff, STRLEN(IObuff) + 4); STRCAT(mesg, ": %s"); s = (char *)((except_T *)value)->value; }