diff src/gui_gtk_x11.c @ 13244:ac42c4b11dbc v8.0.1496

patch 8.0.1496: clearing a pointer takes two lines commit https://github.com/vim/vim/commit/d23a823669d93fb2a570a039173eefe4856ac806 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 10 18:45:26 2018 +0100 patch 8.0.1496: clearing a pointer takes two lines Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629)
author Christian Brabandt <cb@256bit.org>
date Sat, 10 Feb 2018 19:00:07 +0100
parents f4c3a7f410f4
children 5d345460c984
line wrap: on
line diff
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3838,8 +3838,7 @@ gui_mch_init(void)
 # endif
     }
 #endif
-    vim_free(gui_argv);
-    gui_argv = NULL;
+    VIM_CLEAR(gui_argv);
 
 #if GLIB_CHECK_VERSION(2,1,3)
     /* Set the human-readable application name */
@@ -4668,8 +4667,7 @@ gui_mch_open(void)
 		y += hh - pixel_height;
 	    gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
 	}
-	vim_free(gui.geom);
-	gui.geom = NULL;
+	VIM_CLEAR(gui.geom);
 
 	/* From now until everyone's stopped trying to set the window hints
 	 * to their correct minimum values, stop them being set as we need