summaryrefslogtreecommitdiff
path: root/gtk/gtkpagesetupunixdialog.c
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2014-07-14 17:02:13 +0200
committerMarek Kasik <mkasik@redhat.com>2014-10-02 19:06:03 +0200
commit8b5d30d4396ba0e3e0b2ff2e515d8eddb5c26849 (patch)
tree943aa1f3823b96a6ccac13e3250add561f005237 /gtk/gtkpagesetupunixdialog.c
parent07722ae2ddf81edb2f4623bb2aa5ea7bf0301232 (diff)
downloadgtk+-8b5d30d4396ba0e3e0b2ff2e515d8eddb5c26849.tar.gz
Remove redundant checks for NULL
Remove checks for NULL before g_free() and g_clear_object(). Merge check for NULL, freeing of pointer and its setting to NULL by g_clear_pointer(). https://bugzilla.gnome.org/show_bug.cgi?id=733157
Diffstat (limited to 'gtk/gtkpagesetupunixdialog.c')
-rw-r--r--gtk/gtkpagesetupunixdialog.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index d24d34af69..5659e47c40 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -661,11 +661,7 @@ printer_changed_callback (GtkComboBox *combo_box,
/* If we're waiting for a specific printer but the user changed
* to another printer, cancel that wait.
*/
- if (priv->waiting_for_printer)
- {
- g_free (priv->waiting_for_printer);
- priv->waiting_for_printer = NULL;
- }
+ g_clear_pointer (&priv->waiting_for_printer, g_free);
if (priv->request_details_tag)
{