diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-25 20:21:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-25 20:21:28 +0200 |
commit | 51e14387f120392b74b84408cafec33942337a05 (patch) | |
tree | 43d2b2077c404671de3f7fdfc5bc90930aa53d09 /src/if_py_both.h | |
parent | 682725c1415f50681877df60257115a966e2a3d4 (diff) | |
download | vim-git-51e14387f120392b74b84408cafec33942337a05.tar.gz |
patch 8.1.1393: unnecessary type castsv8.1.1393
Problem: Unnecessary type casts.
Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index e36f4fdee..bc33a80a2 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -2953,7 +2953,7 @@ FunctionNew(PyTypeObject *subtype, char_u *name, int argc, typval_T *argv, char_u *np; size_t len = STRLEN(p) + 1; - if ((np = alloc((int)len + 2)) == NULL) + if ((np = alloc(len + 2)) == NULL) { vim_free(p); return NULL; @@ -3139,7 +3139,7 @@ set_partial(FunctionObject *self, partial_T *pt, int exported) if (exported) { pt->pt_argv = (typval_T *)alloc_clear( - sizeof(typval_T) * self->argc); + sizeof(typval_T) * self->argc); for (i = 0; i < pt->pt_argc; ++i) copy_tv(&self->argv[i], &pt->pt_argv[i]); } @@ -4262,7 +4262,7 @@ StringToLine(PyObject *obj) /* Create a copy of the string, with internal nulls replaced by * newline characters, as is the vim convention. */ - save = (char *)alloc((unsigned)(len+1)); + save = (char *)alloc(len+1); if (save == NULL) { PyErr_NoMemory(); |