]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1225: extra NULL check in VIM_CLEAR() v9.1.1225
authorHirohito Higashi <h.east.727@gmail.com>
Wed, 19 Mar 2025 19:25:21 +0000 (20:25 +0100)
committerChristian Brabandt <cb@256bit.org>
Wed, 19 Mar 2025 19:28:20 +0000 (20:28 +0100)
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>
src/macros.h
src/version.c

index 86ae33b4aa225a331a3d29537508bcc585864404..6c2931a292ae18f3a3908b7cad03cc31ae313e12 100644 (file)
  */
 #define VIM_CLEAR(p) \
     do { \
-       if ((p) != NULL) \
-       { \
-           vim_free(p); \
-           (p) = NULL; \
-       } \
+       vim_free(p); \
+       (p) = NULL; \
     } while (0)
 
 /*
index 02f30abf35179929f7d0d76344f14115465efb70..aab2ea5601eb46538d42eb8f52db3d7c5aabeeb3 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1225,
 /**/
     1224,
 /**/