elm_priv.h: Removed null check from ELM_SAFE_FREE because all efl
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Mon, 6 Jan 2014 15:14:35 +0000 (00:14 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Mon, 6 Jan 2014 15:14:35 +0000 (00:14 +0900)
free/del func + free func get null as valid parameter.

Now ELM_SAFE_FREE is less useful than before. It reduced 5 lines to 1
but now it reduces 2 lines to 1.

src/lib/elm_priv.h

index a8757c3d79288d24cee6a85f3dd63d8e39a43c6e..5b1c49425cfaafd27df2c3dcca441a7780e7a86f 100644 (file)
@@ -160,7 +160,7 @@ extern const char *_elm_engines[];
 #undef MAX
 #define MAX(x, y) (((x) > (y)) ? (x) : (y))
 
-#define ELM_SAFE_FREE(_h, _fn) do { if (_h) { _fn((void*)_h); _h = NULL; } } while (0)
+#define ELM_SAFE_FREE(_h, _fn) do { _fn((void*)_h); _h = NULL; } while (0)
 
 #define ELM_PRIV_STATIC_VARIABLE_DECLARE(name, signal, type) \
    static const char name[] = signal;