[epiphany/wip/sync-rebase: 63/86] bookmark-properties-grid: g_strcmp0() can handle NULL for us



commit 06209eaa7a97e9d2b59574c19a2ad4cef46e74dc
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Mon Aug 29 19:00:50 2016 +0300

    bookmark-properties-grid: g_strcmp0() can handle NULL for us

 src/bookmarks/ephy-bookmark-properties-grid.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmark-properties-grid.c b/src/bookmarks/ephy-bookmark-properties-grid.c
index 11f65ac..b64abd5 100644
--- a/src/bookmarks/ephy-bookmark-properties-grid.c
+++ b/src/bookmarks/ephy-bookmark-properties-grid.c
@@ -379,18 +379,14 @@ ephy_bookmark_properties_grid_finalize (GObject *object)
   /* Check if any actual changes were made to the name, address or tags. If yes,
    * set the uploaded flag to FALSE. */
 
-  if (self->prev_name != NULL) {
-    if (g_strcmp0 (self->prev_name, ephy_bookmark_get_title (self->bookmark)) != 0) {
-      ephy_bookmark_set_uploaded (self->bookmark, FALSE);
-      goto out;
-    }
+  if (g_strcmp0 (self->prev_name, ephy_bookmark_get_title (self->bookmark)) != 0) {
+    ephy_bookmark_set_uploaded (self->bookmark, FALSE);
+    goto out;
   }
 
-  if (self->prev_address != NULL) {
-    if (g_strcmp0 (self->prev_address, ephy_bookmark_get_url (self->bookmark)) != 0) {
-      ephy_bookmark_set_uploaded (self->bookmark, FALSE);
-      goto out;
-    }
+  if (g_strcmp0 (self->prev_address, ephy_bookmark_get_url (self->bookmark)) != 0) {
+    ephy_bookmark_set_uploaded (self->bookmark, FALSE);
+    goto out;
   }
 
   if (self->prev_tags != NULL) {


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