comparison src/eval.c @ 16768:695d9ef00b03 v8.1.1386

patch 8.1.1386: unessesary type casts for lalloc() commit https://github.com/vim/vim/commit/18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 24 19:39:03 2019 +0200 patch 8.1.1386: unessesary type casts for lalloc() Problem: Unessesary type casts for lalloc(). Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 May 2019 19:45:05 +0200
parents ef00b6bc186b
children eda4d65f232c
comparison
equal deleted inserted replaced
16767:3959544fc067 16768:695d9ef00b03
489 /* Make a copy of the name, it is used in redir_lval until redir ends. */ 489 /* Make a copy of the name, it is used in redir_lval until redir ends. */
490 redir_varname = vim_strsave(name); 490 redir_varname = vim_strsave(name);
491 if (redir_varname == NULL) 491 if (redir_varname == NULL)
492 return FAIL; 492 return FAIL;
493 493
494 redir_lval = (lval_T *)alloc_clear((unsigned)sizeof(lval_T)); 494 redir_lval = (lval_T *)alloc_clear(sizeof(lval_T));
495 if (redir_lval == NULL) 495 if (redir_lval == NULL)
496 { 496 {
497 var_redir_stop(); 497 var_redir_stop();
498 return FAIL; 498 return FAIL;
499 } 499 }
7286 * value). 7286 * value).
7287 */ 7287 */
7288 typval_T * 7288 typval_T *
7289 alloc_tv(void) 7289 alloc_tv(void)
7290 { 7290 {
7291 return (typval_T *)alloc_clear((unsigned)sizeof(typval_T)); 7291 return (typval_T *)alloc_clear(sizeof(typval_T));
7292 } 7292 }
7293 7293
7294 /* 7294 /*
7295 * Allocate memory for a variable type-value, and assign a string to it. 7295 * Allocate memory for a variable type-value, and assign a string to it.
7296 * The string "s" must have been allocated, it is consumed. 7296 * The string "s" must have been allocated, it is consumed.