Skip to content

Commit e4e0a24

Browse files
h-eastchrisbra
authored andcommitted
patch 9.1.1225: extra NULL check in VIM_CLEAR()
Problem: extra NULL check in VIM_CLEAR() Solution: remove the NULL check and rely on the NULL check in vim_free() instead (Hirohito Higashi). closes: #16936 Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 40ab82b commit e4e0a24

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/macros.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,8 @@
360360
*/
361361
#define VIM_CLEAR(p) \
362362
do { \
363-
if ((p) != NULL) \
364-
{ \
365-
vim_free(p); \
366-
(p) = NULL; \
367-
} \
363+
vim_free(p); \
364+
(p) = NULL; \
368365
} while (0)
369366

370367
/*

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1225,
707709
/**/
708710
1224,
709711
/**/

0 commit comments

Comments
 (0)