summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-14 14:37:07 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-14 14:37:07 +0200
commit2e324950b83fcdf60843b54a6a339183370f338a (patch)
treec80a94cf7de8b07ad87c83d2188e83620df86cb0 /src/gui_gtk_x11.c
parent78a16b0f2a142aae1fdc96c50ab0f25194d0e755 (diff)
patch 8.0.1709: some non-C89 code may slip throughv8.0.1709
Problem: Some non-C89 code may slip through. Solution: Enforce C89 in configure. Fix detected problems. (James McCoy, closes #2735)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index bb679bd975..9c7e8d5648 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -5607,15 +5607,17 @@ gui_mch_free_font(GuiFont font)
guicolor_T
gui_mch_get_color(char_u *name)
{
+ guicolor_T color = INVALCOLOR;
+
if (!gui.in_use) /* can't do this when GUI not running */
- return INVALCOLOR;
+ return color;
+
+ if (name != NULL)
+ color = gui_get_color_cmn(name);
#if GTK_CHECK_VERSION(3,0,0)
- return name != NULL ? gui_get_color_cmn(name) : INVALCOLOR;
+ return color;
#else
- guicolor_T color;
-
- color = (name != NULL) ? gui_get_color_cmn(name) : INVALCOLOR;
if (color == INVALCOLOR)
return INVALCOLOR;