[gtk+] gtkprintunixdialog: Remove a redundant (GFile != NULL) check



commit b37f8b80b46f3453491f5de4df2ca1437c30582b
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Nov 26 15:06:48 2013 +0000

    gtkprintunixdialog: Remove a redundant (GFile != NULL) check
    
    g_file_new_for_uri() is guaranteed to return a non-NULL value, so this
    check was redundant, and was confusing the static analyser into
    returning a false positive, where it thought the file could be NULL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712760

 gtk/gtkprintunixdialog.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index ea66c67..763775c 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -659,8 +659,7 @@ error_dialogs (GtkPrintUnixDialog *print_dialog,
                 {
                   file = g_file_new_for_uri (option->value);
 
-                  if (file != NULL &&
-                      g_file_query_exists (file, NULL))
+                  if (g_file_query_exists (file, NULL))
                     {
                       toplevel = get_toplevel (GTK_WIDGET (print_dialog));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]