Mercurial > vim
diff src/highlight.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 | d9a2e5dcfd9f |
children | ca2e18364888 |
line wrap: on
line diff
--- a/src/highlight.c +++ b/src/highlight.c @@ -963,7 +963,7 @@ do_highlight( break; } vim_free(arg); - arg = vim_strnsave(arg_start, (int)(linep - arg_start)); + arg = vim_strnsave(arg_start, linep - arg_start); if (arg == NULL) { error = TRUE; @@ -5003,7 +5003,7 @@ ex_match(exarg_T *eap) { p = skiptowhite(eap->arg); if (!eap->skip) - g = vim_strnsave(eap->arg, (int)(p - eap->arg)); + g = vim_strnsave(eap->arg, p - eap->arg); p = skipwhite(p); if (*p == NUL) {