jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=10f1fedfec128cd319adb7053373f8ae850d9eb4

commit 10f1fedfec128cd319adb7053373f8ae850d9eb4
Author: Bryce Harrington <br...@osg.samsung.com>
Date:   Tue Apr 18 16:18:56 2017 +0900

    ecore_evas: Unnecessary to test p before calling free(p)
    
    Summary:
    Modern, standards-compliant compilers already test p, so as per the C
    spec it is superfluous to do so before the call.
    
    Reviewers: jpeg
    
    Reviewed By: jpeg
    
    Subscribers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D4791
---
 src/lib/ecore_evas/ecore_evas.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index bc847b03..d34fa8e 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3098,19 +3098,19 @@ _ecore_evas_free(Ecore_Evas *ee)
      }
    if (ee->data) eina_hash_free(ee->data);
    ee->data = NULL;
-   if (ee->name) free(ee->name);
+   free(ee->name);
    ee->name = NULL;
-   if (ee->prop.title) free(ee->prop.title);
+   free(ee->prop.title);
    ee->prop.title = NULL;
-   if (ee->prop.name) free(ee->prop.name);
+   free(ee->prop.name);
    ee->prop.name = NULL;
-   if (ee->prop.clas) free(ee->prop.clas);
+   free(ee->prop.clas);
    ee->prop.clas = NULL;
    _ecore_evas_window_profile_free(ee);
    ee->prop.profile.name = NULL;
    _ecore_evas_window_available_profiles_free(ee);
    ee->prop.profile.available_list = NULL;
-   if (ee->prop.wm_rot.available_rots) free(ee->prop.wm_rot.available_rots);
+   free(ee->prop.wm_rot.available_rots);
    ee->prop.wm_rot.available_rots = NULL;
    if (ee->prop.wm_rot.manual_mode.timer)
      ecore_timer_del(ee->prop.wm_rot.manual_mode.timer);
@@ -3119,7 +3119,7 @@ _ecore_evas_free(Ecore_Evas *ee)
    efl_event_callback_array_del(ee->evas, _ecore_evas_device_cbs(), ee);
    eina_hash_free(ee->prop.cursors);
    ee->prop.cursors = NULL;
-   if (ee->evas) evas_free(ee->evas);
+   evas_free(ee->evas);
    ee->evas = NULL;
    ECORE_MAGIC_SET(ee, ECORE_MAGIC_NONE);
    ee->driver = NULL;

-- 


Reply via email to