[geany/geany] 159000: Remove an unnecessary allocation
Colomban Wendling
git-noreply at xxxxx
Wed Dec 4 13:59:05 UTC 2013
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Wed, 04 Dec 2013 13:59:05 UTC
Commit: 1590007862ce13b14e3af6e0f4f1d1b5afb73554
https://github.com/geany/geany/commit/1590007862ce13b14e3af6e0f4f1d1b5afb73554
Log Message:
-----------
Remove an unnecessary allocation
Modified Paths:
--------------
src/prefs.c
Modified: src/prefs.c
8 files changed, 3 insertions(+), 5 deletions(-)
===================================================================
@@ -396,7 +396,7 @@ static void kb_init(void)
static void prefs_init_dialog(void)
{
GtkWidget *widget;
- GdkColor *color;
+ GdkColor color = {0};
/* Synchronize with Stash settings */
prefs_action(PREF_DISPLAY);
@@ -477,11 +477,9 @@ static void prefs_init_dialog(void)
}
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
- color = g_new0(GdkColor, 1);
- gdk_color_parse(editor_prefs.long_line_color, color);
+ gdk_color_parse(editor_prefs.long_line_color, &color);
widget = ui_lookup_widget(ui_widgets.prefs_dialog, "long_line_color");
- gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), color);
- g_free(color);
+ gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), &color);
widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.show_notebook_tabs);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list