# HG changeset patch # User ib # Date 1365081711 0 # Node ID 94188b63e047a9c7265cdf2d6956abeed682d80a # Parent 4489eafbe0a96c7578cea2a6457a17da0236996d Avoid casts by passing an existing pointer. diff -r 4489eafbe0a9 -r 94188b63e047 gui/dialog/url.c --- a/gui/dialog/url.c Thu Apr 04 12:10:14 2013 +0000 +++ b/gui/dialog/url.c Thu Apr 04 13:21:51 2013 +0000 @@ -45,7 +45,7 @@ (void)button; - if ((int)user_data) { + if (user_data) { gchar *str = strdup(gtk_entry_get_text(GTK_ENTRY(urlEntry))); if (str) { @@ -122,7 +122,7 @@ gtk_widget_add_accelerator(Cancel, "clicked", accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE); gtk_signal_connect(GTK_OBJECT(URLDialog), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &URLDialog); - gtk_signal_connect(GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(button_clicked), (void *)1); + gtk_signal_connect(GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(button_clicked), Ok); gtk_signal_connect(GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(button_clicked), NULL); gtk_widget_grab_focus(urlEntry);