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



commit 3b6e7a698f55f8e766eac0e66a70a9ae54147635
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/ephy-bookmark-properties-grid.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/ephy-bookmark-properties-grid.c b/src/ephy-bookmark-properties-grid.c
index 8f311ce..5b2d852 100644
--- a/src/ephy-bookmark-properties-grid.c
+++ b/src/ephy-bookmark-properties-grid.c
@@ -400,18 +400,14 @@ ephy_bookmark_properties_grid_destroy (GtkWidget *widget)
   /* 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]