[gnome-photos/wip/rishi/manager-model: 4/7] base-manager: Remove redundant NULL check



commit 536145f0139c9981ea2f6b925e935c0e7d3f43d1
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 8 09:46:04 2016 +0100

    base-manager: Remove redundant NULL check
    
    photos_base_manager_get_object_by_id already ensures that a NULL isn't
    propagated.

 src/photos-base-manager.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-base-manager.c b/src/photos-base-manager.c
index fb3d30a..31ce0be 100644
--- a/src/photos-base-manager.c
+++ b/src/photos-base-manager.c
@@ -101,16 +101,11 @@ static GObject *
 photos_base_manager_default_get_object_by_id (PhotosBaseManager *self, const gchar *id)
 {
   PhotosBaseManagerPrivate *priv;
-  GObject *ret_val = NULL;
+  GObject *ret_val;
 
   priv = photos_base_manager_get_instance_private (self);
 
-  if (id == NULL)
-    goto out;
-
   ret_val = g_hash_table_lookup (priv->objects, id);
-
- out:
   return ret_val;
 }
 


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