[epiphany/mcatanzaro/cppcheck: 3/12] download: fix cppcheck warnings



commit c297cb81e94b85892f9a3055b95b2122f687b6b7
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Nov 17 09:14:51 2019 -0600

    download: fix cppcheck warnings
    
    Here we have an unused instance member variable and a redundant
    condition.

 embed/ephy-download.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 8bc6094b9..2a451bb51 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -41,7 +41,6 @@ struct _EphyDownload {
 
   WebKitDownload *download;
 
-  char *destination;
   char *content_type;
 
   gboolean show_notification;
@@ -697,7 +696,7 @@ download_created_destination_cb (WebKitDownload *wk_download,
   }
 
   if (!download->content_type ||
-      (download->content_type && !g_content_type_equals (download->content_type, content_type))) {
+      !g_content_type_equals (download->content_type, content_type)) {
     g_free (download->content_type);
     download->content_type = content_type;
     g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_CONTENT_TYPE]);


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