ecore_ipc: remove redundant code
authorThiep Ha <thiepha@gmail.com>
Mon, 27 Jul 2015 23:08:11 +0000 (01:08 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 28 Jul 2015 01:05:37 +0000 (03:05 +0200)
Summary:
buf is always NULL (already freed and set to NULL).
We don't need to add NULL checking and free it.

Reviewers: raster, cedric, Hermet

Subscribers: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D2783

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ecore_ipc/ecore_ipc.c

index 78f725a..4588199 100644 (file)
@@ -1506,12 +1506,11 @@ _ecore_ipc_event_server_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, vo
                     }
                   svr->prev.i = msg;
                   offset += (s + msg.size);
-                  if ((svr->buf_size == offset) && ((svr->buf) || (buf)))
+                  if ((svr->buf_size == offset) && (svr->buf))
                     {
                        if (svr->buf) free(svr->buf);
                        svr->buf = NULL;
                        svr->buf_size = 0;
-                       if (buf) free(buf);
                        return ECORE_CALLBACK_CANCEL;
                     }
                   goto redo;