Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
aclass.c alert.c arrange.c backgrounds.c borders.c buttons.c
cmclass.c comms.c config.c container.c cursors.c desktops.c
dialog.c ecompmgr.c econfig.c eobj.c ewin-ops.c ewins.c ewmh.c
file.c fonts.c fx.c gnome.c groups.c iclass.c iconify.c lang.c
main.c memory.c menus-misc.c menus.c moveresize.c pager.c
session.c snaps.c sound.c tclass.c text.c theme.c timers.c
tooltips.c util.h warp.c windowmatch.c x.c
Log Message:
Assume free(0) is ok (if not HAVE_FREE_NULL_BUG will have to be defined).
===================================================================
RCS file: /cvs/e/e16/e/src/aclass.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- aclass.c 27 Jul 2007 16:59:49 -0000 1.44
+++ aclass.c 23 Feb 2008 12:09:35 -0000 1.45
@@ -79,8 +79,7 @@
ptr = ActionTypeToRemove;
while (ptr)
{
- if (ptr->params)
- Efree(ptr->params);
+ Efree(ptr->params);
pp = ptr;
ptr = ptr->next;
Efree(pp);
@@ -123,10 +122,8 @@
UnGrabActionKey(aa);
if (aa->action)
RemoveActionType(aa->action);
- if (aa->tooltipstring)
- Efree(aa->tooltipstring);
- if (aa->key_str)
- Efree(aa->key_str);
+ Efree(aa->tooltipstring);
+ Efree(aa->key_str);
Efree(aa);
}
@@ -211,12 +208,9 @@
for (i = 0; i < ac->num; i++)
ActionDestroy(ac->list[i]);
- if (ac->list)
- Efree(ac->list);
- if (ac->name)
- Efree(ac->name);
- if (ac->tooltipstring)
- Efree(ac->tooltipstring);
+ Efree(ac->list);
+ Efree(ac->name);
+ Efree(ac->tooltipstring);
Efree(ac);
mode_action_destroy = 1;
}
@@ -306,8 +300,6 @@
(aclass_tooltipstring) ? Estrdup((aclass_tooltipstring[0]) ?
aclass_tooltipstring :
"?!?") : NULL;
- _EFREE(aclass_tooltipstring);
- _EFREE(action_tooltipstring);
err = 0;
goto done;
@@ -457,7 +449,8 @@
aa = ActionCreate(event, anymod, mod, anybut, but, anykey,
key, action_tooltipstring);
/* the correct place to grab an action key */
- _EFREE(action_tooltipstring);
+ Efree(action_tooltipstring);
+ action_tooltipstring = NULL;
key[0] = '\0';
if (global)
GrabActionKey(aa);
@@ -482,8 +475,8 @@
ActionclassDestroy(ac);
done:
- _EFREE(aclass_tooltipstring);
- _EFREE(action_tooltipstring);
+ Efree(aclass_tooltipstring);
+ Efree(action_tooltipstring);
return err;
}
===================================================================
RCS file: /cvs/e/e16/e/src/alert.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- alert.c 23 Aug 2007 18:48:20 -0000 1.54
+++ alert.c 23 Feb 2008 12:09:35 -0000 1.55
@@ -536,12 +536,9 @@
}
done:
- if (str1)
- Efree(str1);
- if (str2)
- Efree(str2);
- if (str3)
- Efree(str3);
+ Efree(str1);
+ Efree(str2);
+ Efree(str3);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/arrange.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- arrange.c 27 Jan 2008 18:41:55 -0000 1.101
+++ arrange.c 23 Feb 2008 12:09:35 -0000 1.102
@@ -424,14 +424,10 @@
done:
/* free up memory */
- if (xarray)
- Efree(xarray);
- if (yarray)
- Efree(yarray);
- if (filled)
- Efree(filled);
- if (spaces)
- Efree(spaces);
+ Efree(xarray);
+ Efree(yarray);
+ Efree(filled);
+ Efree(spaces);
}
void
@@ -638,8 +634,7 @@
dy = 0;
}
- if (lst)
- Efree(lst);
+ Efree(lst);
if ((odx != dx) || (ody != dy))
{
@@ -851,10 +846,8 @@
break;
}
}
- if (ret)
- Efree(ret);
- if (fixed)
- Efree(fixed);
+ Efree(ret);
+ Efree(fixed);
}
void
@@ -918,12 +911,9 @@
EwinMove(ewin, ret[i].x, ret[i].y);
}
- if (fixed)
- Efree(fixed);
- if (ret)
- Efree(ret);
- if (floating)
- Efree(floating);
+ Efree(fixed);
+ Efree(ret);
+ Efree(floating);
done:
return;
===================================================================
RCS file: /cvs/e/e16/e/src/backgrounds.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- backgrounds.c 15 Dec 2007 16:29:22 -0000 1.102
+++ backgrounds.c 23 Feb 2008 12:09:35 -0000 1.103
@@ -210,20 +210,16 @@
static void
BackgroundFilesRemove(Background * bg)
{
- if (bg->bg.file)
- Efree(bg->bg.file);
+ Efree(bg->bg.file);
bg->bg.file = NULL;
- if (bg->bg.real_file)
- Efree(bg->bg.real_file);
+ Efree(bg->bg.real_file);
bg->bg.real_file = NULL;
- if (bg->top.file)
- Efree(bg->top.file);
+ Efree(bg->top.file);
bg->top.file = NULL;
- if (bg->top.real_file)
- Efree(bg->top.real_file);
+ Efree(bg->top.real_file);
bg->top.real_file = NULL;
BackgroundImagesFree(bg);
@@ -249,8 +245,7 @@
BackgroundFilesRemove(bg);
BackgroundPixmapFree(bg);
- if (bg->name)
- Efree(bg->name);
+ Efree(bg->name);
Efree(bg);
@@ -424,8 +419,7 @@
}
else
updated = 1;
- if (bg->bg.file)
- Efree(bg->bg.file);
+ Efree(bg->bg.file);
bg->bg.file = (bgn[0]) ? Estrdup(bgn) : NULL;
if ((int)tile != bg->bg_tile)
updated = 1;
@@ -453,8 +447,7 @@
}
else
updated = 1;
- if (bg->top.file)
- Efree(bg->top.file);
+ Efree(bg->top.file);
bg->top.file = (top[0]) ? Estrdup(top) : NULL;
if ((int)tkeep_aspect != bg->top.keep_aspect)
updated = 1;
@@ -1193,8 +1186,7 @@
}
else
{
- if (name)
- Efree(name);
+ Efree(name);
name = Estrdup(s2);
}
break;
@@ -1230,19 +1222,14 @@
&i3, &i4, &i5, &i6);
if (!ignore)
{
- if (bg1)
- Efree(bg1);
+ Efree(bg1);
bg1 = Estrdup(s2);
}
else
{
- if (bg->bg.file)
- Efree(bg->bg.file);
- if (bg->top.file)
- {
- Efree(bg->top.file);
- bg->top.file = NULL;
- }
+ Efree(bg->bg.file);
+ Efree(bg->top.file);
+ bg->top.file = NULL;
bg->bg.file = Estrdup(s2);
bg->bg_tile = i1;
bg->bg.keep_aspect = i2;
@@ -1258,8 +1245,7 @@
&j4, &j5);
if (!ignore)
{
- if (bg2)
- Efree(bg2);
+ Efree(bg2);
bg2 = Estrdup(s2);
}
else
@@ -1280,12 +1266,9 @@
err = -1;
done:
- if (name)
- Efree(name);
- if (bg1)
- Efree(bg1);
- if (bg2)
- Efree(bg2);
+ Efree(name);
+ Efree(bg1);
+ Efree(bg2);
return err;
}
@@ -1614,8 +1597,7 @@
Esnprintf(s, sizeof(s),
_("Background definition information:\nName: %s\nFile: %s\n"),
BackgroundGetName(tmp_bg), (stmp) ? stmp : _("-NONE-"));
- if (stmp)
- Efree(stmp);
+ Efree(stmp);
DialogItemSetText(di, s);
}
@@ -2389,8 +2371,7 @@
}
else if (!strcmp(type, "bg.file"))
{
- if (bg->bg.file)
- Efree(bg->bg.file);
+ Efree(bg->bg.file);
bg->bg.file = Estrdup(p);
}
else if (!strcmp(type, "bg.tile"))
@@ -2419,8 +2400,7 @@
}
else if (!strcmp(type, "top.file"))
{
- if (bg->top.file)
- Efree(bg->top.file);
+ Efree(bg->top.file);
bg->top.file = Estrdup(p);
}
else if (!strcmp(type, "top.keep_aspect"))
===================================================================
RCS file: /cvs/e/e16/e/src/borders.c,v
retrieving revision 1.305
retrieving revision 1.306
diff -u -3 -r1.305 -r1.306
--- borders.c 19 Jan 2008 13:32:30 -0000 1.305
+++ borders.c 23 Feb 2008 12:09:35 -0000 1.306
@@ -477,8 +477,7 @@
if (ewin->bits[i].win)
EDestroyWindow(ewin->bits[i].win);
}
- if (ewin->bits)
- Efree(ewin->bits);
+ Efree(ewin->bits);
ewin->bits = NULL;
BorderDecRefcount(b);
@@ -647,13 +646,9 @@
ECursorFree(b->part[i].ec);
}
- if (b->num_winparts > 0)
- Efree(b->part);
-
- if (b->name)
- Efree(b->name);
- if (b->group_border_name)
- Efree(b->group_border_name);
+ Efree(b->part);
+ Efree(b->name);
+ Efree(b->group_border_name);
ActionclassFree(b->aclass);
}
===================================================================
RCS file: /cvs/e/e16/e/src/buttons.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- buttons.c 30 Dec 2007 21:20:52 -0000 1.109
+++ buttons.c 23 Feb 2008 12:09:35 -0000 1.110
@@ -192,9 +192,7 @@
ImageclassFree(b->iclass);
ActionclassFree(b->aclass);
TextclassFree(b->tclass);
-
- if (b->label)
- Efree(b->label);
+ Efree(b->label);
Efree(b);
}
===================================================================
RCS file: /cvs/e/e16/e/src/cmclass.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- cmclass.c 27 Jul 2007 16:59:49 -0000 1.26
+++ cmclass.c 23 Feb 2008 12:09:35 -0000 1.27
@@ -309,20 +309,13 @@
err = -1;
done:
- if (name)
- Efree(name);
- if (rx)
- Efree(rx);
- if (ry)
- Efree(ry);
- if (gx)
- Efree(gx);
- if (gy)
- Efree(gy);
- if (bx)
- Efree(bx);
- if (by)
- Efree(by);
+ Efree(name);
+ Efree(rx);
+ Efree(ry);
+ Efree(gx);
+ Efree(gy);
+ Efree(bx);
+ Efree(by);
return err;
}
@@ -338,18 +331,12 @@
if (!cm)
return;
- if (cm->red.px)
- Efree(cm->red.px);
- if (cm->red.py)
- Efree(cm->red.py);
- if (cm->green.px)
- Efree(cm->green.px);
- if (cm->green.py)
- Efree(cm->green.py);
- if (cm->blue.px)
- Efree(cm->blue.px);
- if (cm->blue.py)
- Efree(cm->blue.py);
+ Efree(cm->red.px);
+ Efree(cm->red.py);
+ Efree(cm->green.px);
+ Efree(cm->green.py);
+ Efree(cm->blue.px);
+ Efree(cm->blue.py);
cm->red.px = NULL;
cm->red.py = NULL;
@@ -602,18 +589,12 @@
AddItem(cm, cm->name, 0, LIST_TYPE_COLORMODIFIER);
}
Efree(name);
- if (rpx)
- Efree(rpx);
- if (rpy)
- Efree(rpy);
- if (gpx)
- Efree(gpx);
- if (gpy)
- Efree(gpy);
- if (bpx)
- Efree(bpx);
- if (bpy)
- Efree(bpy);
+ Efree(rpx);
+ Efree(rpy);
+ Efree(gpx);
+ Efree(gpy);
+ Efree(bpx);
+ Efree(bpy);
}
static const IpcItem CmClassIpcArray[] = {
===================================================================
RCS file: /cvs/e/e16/e/src/comms.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- comms.c 23 Feb 2008 11:57:41 -0000 1.88
+++ comms.c 23 Feb 2008 12:09:35 -0000 1.89
@@ -75,16 +75,12 @@
ecore_list_node_remove(client_list, c);
- if (c->name)
- Efree(c->name);
- if (c->msg)
- Efree(c->msg);
- if (c->clientname)
- Efree(c->clientname);
- if (c->version)
- Efree(c->version);
- if (c->info)
- Efree(c->info);
+ Efree(c->name);
+ Efree(c->msg);
+ Efree(c->clientname);
+ Efree(c->version);
+ Efree(c->info);
+
Efree(c);
}
@@ -101,14 +97,12 @@
if (!strcmp(param, "clientname"))
{
- if (c->clientname)
- Efree(c->clientname);
+ Efree(c->clientname);
c->clientname = Estrdup(value);
}
else if (!strcmp(param, "version"))
{
- if (c->version)
- Efree(c->version);
+ Efree(c->version);
c->version = Estrdup(value);
}
else if (!strcmp(param, "author"))
@@ -125,8 +119,7 @@
}
else if (!strcmp(param, "info"))
{
- if (c->info)
- Efree(c->info);
+ Efree(c->info);
c->info = Estrdup(value);
}
else if (!strcmp(param, "pixmap"))
===================================================================
RCS file: /cvs/e/e16/e/src/config.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -3 -r1.159 -r1.160
--- config.c 28 Jul 2007 13:58:20 -0000 1.159
+++ config.c 23 Feb 2008 12:09:35 -0000 1.160
@@ -253,12 +253,9 @@
def_shell, path, dest);
system(execline);
- if (def_user)
- Efree(def_user);
- if (def_shell)
- Efree(def_shell);
- if (def_home)
- Efree(def_home);
+ Efree(def_user);
+ Efree(def_shell);
+ Efree(def_home);
return exists(dest) ? 0 : 1;
}
===================================================================
RCS file: /cvs/e/e16/e/src/container.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- container.c 15 Dec 2007 17:10:47 -0000 1.19
+++ container.c 23 Feb 2008 12:09:36 -0000 1.20
@@ -173,13 +173,11 @@
ct->ops->Exit(ct, exiting);
- if (ct->name)
- Efree(ct->name);
+ Efree(ct->name);
EDestroyWindow(ct->win);
- if (ct->objs)
- Efree(ct->objs);
+ Efree(ct->objs);
Efree(ct);
@@ -1547,8 +1545,7 @@
tmp_ib_cover_hide = ct->cover_hide;
tmp_ib_autoresize_anchor = ct->auto_resize_anchor;
tmp_ib_anim_mode = ct->anim_mode;
- if (tmp_ib_name)
- Efree(tmp_ib_name);
+ Efree(tmp_ib_name);
tmp_ib_name = Estrdup(ct->name);
DialogSetTitle(d, ct->dlg_title);
===================================================================
RCS file: /cvs/e/e16/e/src/cursors.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- cursors.c 28 Aug 2007 17:58:23 -0000 1.45
+++ cursors.c 23 Feb 2008 12:09:36 -0000 1.46
@@ -125,10 +125,9 @@
ecore_list_node_remove(cursor_list, ec);
- if (ec->name)
- Efree(ec->name);
- if (ec->file)
- Efree(ec->file);
+ Efree(ec->name);
+ Efree(ec->file);
+
Efree(ec);
}
===================================================================
RCS file: /cvs/e/e16/e/src/desktops.c,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -3 -r1.279 -r1.280
--- desktops.c 13 Feb 2008 21:31:28 -0000 1.279
+++ desktops.c 23 Feb 2008 12:09:36 -0000 1.280
@@ -1440,8 +1440,7 @@
XRestackWindows(disp, wl, tot);
- if (wl)
- Efree(wl);
+ Efree(wl);
done:
if (dsk->stack.update_client_list)
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.c,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -3 -r1.195 -r1.196
--- dialog.c 3 Feb 2008 16:52:38 -0000 1.195
+++ dialog.c 23 Feb 2008 12:09:36 -0000 1.196
@@ -232,7 +232,8 @@
void
DialogKeybindingsDestroy(Dialog * d)
{
- _EFREE(d->keybindings);
+ Efree(d->keybindings);
+ d->keybindings = NULL;
d->num_bindings = 0;
}
@@ -267,10 +268,8 @@
{
ecore_list_node_remove(dialog_list, d);
- if (d->name)
- Efree(d->name);
- if (d->title)
- Efree(d->title);
+ Efree(d->name);
+ Efree(d->title);
DialogKeybindingsDestroy(d);
if (d->item)
DialogItemDestroy(d->item, 0);
@@ -298,8 +297,7 @@
void
DialogSetTitle(Dialog * d, const char *title)
{
- if (d->title)
- Efree(d->title);
+ Efree(d->title);
d->title = Estrdup(title);
d->set_title = 1;
}
@@ -1439,10 +1437,8 @@
r++;
}
}
- if (col_size)
- Efree(col_size);
- if (row_size)
- Efree(row_size);
+ Efree(col_size);
+ Efree(row_size);
}
}
break;
@@ -1799,8 +1795,7 @@
void
DialogItemSetText(DItem * di, const char *text)
{
- if (di->text)
- Efree(di->text);
+ Efree(di->text);
di->text = Estrdup(text);
}
@@ -1876,8 +1871,7 @@
void
DialogItemImageSetFile(DItem * di, const char *image)
{
- if (di->item.image.image)
- Efree(di->item.image.image);
+ Efree(di->item.image.image);
di->item.image.image = Estrdup(image);
di->fill_h = 0;
di->fill_v = 0;
@@ -2001,9 +1995,7 @@
for (i = 0; i < di->item.table.num_items; i++)
DialogItemDestroy(di->item.table.items[i], 1);
- if (di->item.table.items)
- Efree(di->item.table.items);
-
+ Efree(di->item.table.items);
di->item.table.items = NULL;
di->item.table.num_items = 0;
}
@@ -2014,8 +2006,7 @@
if (di->type == DITEM_TABLE)
DialogItemTableEmpty(di);
- if (di->text)
- Efree(di->text);
+ Efree(di->text);
switch (di->type)
{
@@ -2027,8 +2018,7 @@
EDestroyWindow(di->item.check_button.check_win);
break;
case DITEM_IMAGE:
- if (di->item.image.image)
- Efree(di->item.image.image);
+ Efree(di->item.image.image);
break;
case DITEM_RADIOBUTTON:
if (!clean)
===================================================================
RCS file: /cvs/e/e16/e/src/ecompmgr.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -3 -r1.169 -r1.170
--- ecompmgr.c 13 Feb 2008 21:31:28 -0000 1.169
+++ ecompmgr.c 23 Feb 2008 12:09:36 -0000 1.170
@@ -1822,7 +1822,8 @@
REGION_DESTROY(cw->extents);
REGION_DESTROY(cw->clip);
- _EFREE(eo->cmhook);
+ Efree(eo->cmhook);
+ eo->cmhook = NULL;
_ECM_SET_STACK_CHANGED();
}
@@ -2392,8 +2393,7 @@
OpacityFix(Conf_compmgr.shadows.sharp.opacity, 100);
Mode_compmgr.opac_sharp = .01 * Conf_compmgr.shadows.sharp.opacity;
- if (gaussianMap)
- Efree(gaussianMap);
+ Efree(gaussianMap);
gaussianMap = NULL;
if (mode != ECM_SHADOWS_OFF)
===================================================================
RCS file: /cvs/e/e16/e/src/econfig.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- econfig.c 16 Jun 2007 11:04:58 -0000 1.16
+++ econfig.c 23 Feb 2008 12:09:36 -0000 1.17
@@ -412,8 +412,7 @@
*((float *)ci->ptr) = fval;
break;
case ITEM_TYPE_STRING:
- if (*(char **)ci->ptr)
- Efree(*(char **)ci->ptr);
+ Efree(*(char **)ci->ptr);
if (*str == '\0')
str = NULL;
*((char **)ci->ptr) = Estrdup(str);
===================================================================
RCS file: /cvs/e/e16/e/src/eobj.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -3 -r1.99 -r1.100
--- eobj.c 13 Feb 2008 21:31:28 -0000 1.99
+++ eobj.c 23 Feb 2008 12:09:36 -0000 1.100
@@ -246,12 +246,9 @@
else
EDestroyWindow(eo->win);
- if (eo->icccm.wm_name)
- Efree(eo->icccm.wm_name);
- if (eo->icccm.wm_res_name)
- Efree(eo->icccm.wm_res_name);
- if (eo->icccm.wm_res_class)
- Efree(eo->icccm.wm_res_class);
+ Efree(eo->icccm.wm_name);
+ Efree(eo->icccm.wm_res_name);
+ Efree(eo->icccm.wm_res_class);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/ewin-ops.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -3 -r1.122 -r1.123
--- ewin-ops.c 24 Dec 2007 07:41:03 -0000 1.122
+++ ewin-ops.c 23 Feb 2008 12:09:36 -0000 1.123
@@ -419,8 +419,7 @@
EoGetY(lst[i]) + dy, 0, 0,
flags & (MRF_DESK | MRF_MOVE |
MRF_FLOAT | MRF_UNFLOAT));
- if (lst)
- Efree(lst);
+ Efree(lst);
}
EwinDetermineArea(ewin);
@@ -588,8 +587,7 @@
if (lst && call_depth == 1)
GNOME_SetClientList();
#endif
- if (lst)
- Efree(lst);
+ Efree(lst);
EwinStateUpdate(ewin);
HintsSetWindowState(ewin);
@@ -663,8 +661,7 @@
if (lst && call_depth == 1)
GNOME_SetClientList();
#endif
- if (lst)
- Efree(lst);
+ Efree(lst);
EwinStateUpdate(ewin);
HintsSetWindowState(ewin);
@@ -1308,8 +1305,7 @@
EoSetLayer(lst[i], lst[i]->save_fs.layer +
EoGetLayer(ewin) - ewin->save_fs.layer);
}
- if (lst)
- Efree(lst);
+ Efree(lst);
}
EwinRaise(ewin);
@@ -1334,8 +1330,7 @@
lst = EwinListTransients(ewin, &num, 0);
for (i = 0; i < num; i++)
EoSetLayer(lst[i], lst[i]->save_fs.layer);
- if (lst)
- Efree(lst);
+ Efree(lst);
}
EoSetLayer(ewin, ewin->save_fs.layer);
@@ -1428,8 +1423,7 @@
ICCCM_Delete(gwins[i]);
SoundPlay("SOUND_WINDOW_CLOSE");
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
void
@@ -1524,8 +1518,7 @@
EwinRaise(gwins[j]);
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
#endif
@@ -1554,8 +1547,7 @@
EwinStick(gwins[i]);
}
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
void
@@ -1636,8 +1628,7 @@
EwinIconify(gwins[i]);
}
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
void
@@ -1736,8 +1727,7 @@
}
SnapshotEwinUpdate(gwins[i], SNAP_USE_BORDER);
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/ewins.c,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -3 -r1.219 -r1.220
--- ewins.c 13 Feb 2008 21:31:28 -0000 1.219
+++ ewins.c 23 Feb 2008 12:09:36 -0000 1.220
@@ -392,8 +392,7 @@
if (lst[i]->icccm.transient_count < 0) /* Paranoia? */
lst[i]->icccm.transient_count = 0;
}
- if (lst)
- Efree(lst);
+ Efree(lst);
EwinCleanup(ewin);
EobjListOrderDel(&ewin->o);
@@ -402,26 +401,18 @@
HintsSetClientList();
- if (ewin->icccm.wm_icon_name)
- Efree(ewin->icccm.wm_icon_name);
- if (ewin->icccm.wm_role)
- Efree(ewin->icccm.wm_role);
- if (ewin->icccm.wm_command)
- Efree(ewin->icccm.wm_command);
- if (ewin->icccm.wm_machine)
- Efree(ewin->icccm.wm_machine);
- if (ewin->ewmh.wm_name)
- Efree(ewin->ewmh.wm_name);
- if (ewin->ewmh.wm_icon_name)
- Efree(ewin->ewmh.wm_icon_name);
- if (ewin->ewmh.wm_icon)
- Efree(ewin->ewmh.wm_icon);
- if (ewin->bits)
- Efree(ewin->bits);
- if (ewin->session_id)
- Efree(ewin->session_id);
+ Efree(ewin->icccm.wm_icon_name);
+ Efree(ewin->icccm.wm_role);
+ Efree(ewin->icccm.wm_command);
+ Efree(ewin->icccm.wm_machine);
+ Efree(ewin->ewmh.wm_name);
+ Efree(ewin->ewmh.wm_icon_name);
+ Efree(ewin->ewmh.wm_icon);
+ Efree(ewin->bits);
+ Efree(ewin->session_id);
FreePmapMask(&ewin->mini_pmm);
GroupsEwinRemove(ewin);
+
Efree(ewin);
}
@@ -1385,8 +1376,7 @@
lst = EwinListTransients(ewin, &num, 1);
for (i = 0; i < num; i++)
EwinRaise(lst[i]);
- if (lst)
- Efree(lst);
+ Efree(lst);
if (call_depth == 1)
{
@@ -1421,8 +1411,7 @@
lst = EwinListTransientFor(ewin, &num);
for (i = 0; i < num; i++)
EwinLower(lst[i]);
- if (lst)
- Efree(lst);
+ Efree(lst);
if (call_depth == 1)
{
===================================================================
RCS file: /cvs/e/e16/e/src/ewmh.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -3 -r1.121 -r1.122
--- ewmh.c 24 Dec 2007 08:12:00 -0000 1.121
+++ ewmh.c 23 Feb 2008 12:09:36 -0000 1.122
@@ -612,11 +612,8 @@
unsigned int *val;
int num;
- if (ewin->ewmh.wm_icon)
- {
- Efree(ewin->ewmh.wm_icon);
- ewin->ewmh.wm_icon = NULL;
- }
+ Efree(ewin->ewmh.wm_icon);
+ ewin->ewmh.wm_icon = NULL;
num = ecore_x_window_prop_card32_list_get(EwinGetClientXwin(ewin),
ECORE_X_ATOM_NET_WM_ICON, &val);
===================================================================
RCS file: /cvs/e/e16/e/src/file.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- file.c 17 Jan 2007 01:10:43 -0000 1.79
+++ file.c 23 Feb 2008 12:09:36 -0000 1.80
@@ -316,8 +316,7 @@
if (file_test(s, test))
return s;
}
- if (s)
- Efree(s);
+ Efree(s);
return NULL;
}
===================================================================
RCS file: /cvs/e/e16/e/src/fonts.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- fonts.c 5 Sep 2007 19:12:55 -0000 1.14
+++ fonts.c 23 Feb 2008 12:09:36 -0000 1.15
@@ -38,8 +38,9 @@
if (!fa)
return;
- _EFREE(fa->name);
- _EFREE(fa->font);
+ Efree(fa->name);
+ Efree(fa->font);
+
Efree(fa);
}
===================================================================
RCS file: /cvs/e/e16/e/src/fx.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- fx.c 18 May 2007 08:25:02 -0000 1.81
+++ fx.c 23 Feb 2008 12:09:36 -0000 1.82
@@ -671,8 +671,7 @@
{
RemoveTimerEvent("FX_IMAGESPINNER_TIMEOUT");
XClearArea(disp, fx_imagespinner_win, 0, 0, VRoot.w, VRoot.h, False);
- if (fx_imagespinner_params)
- Efree(fx_imagespinner_params);
+ Efree(fx_imagespinner_params);
fx_imagespinner_params = NULL;
fx_imagespinner_win = None;
}
===================================================================
RCS file: /cvs/e/e16/e/src/gnome.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- gnome.c 15 Apr 2007 14:54:11 -0000 1.72
+++ gnome.c 23 Feb 2008 12:09:36 -0000 1.73
@@ -644,8 +644,7 @@
ecore_x_window_prop_string_list_set(VRoot.xwin, atom_set, names, n_desks);
for (i = 0; i < n_desks; i++)
- if (names[i])
- Efree(names[i]);
+ Efree(names[i]);
Efree(names);
}
@@ -674,8 +673,7 @@
}
}
ecore_x_window_prop_card32_set(VRoot.xwin, atom_set, wl, j);
- if (wl)
- Efree(wl);
+ Efree(wl);
}
static void
===================================================================
RCS file: /cvs/e/e16/e/src/groups.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- groups.c 25 Jul 2007 20:02:57 -0000 1.96
+++ groups.c 23 Feb 2008 12:09:36 -0000 1.97
@@ -102,8 +102,8 @@
if (g == Mode_groups.current)
Mode_groups.current = NULL;
- if (g->members)
- Efree(g->members);
+ Efree(g->members);
+
Efree(g);
}
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -3 -r1.130 -r1.131
--- iclass.c 3 Feb 2008 16:52:38 -0000 1.130
+++ iclass.c 23 Feb 2008 12:09:36 -0000 1.131
@@ -224,38 +224,34 @@
}
static void
-FreeImageState(ImageState * i)
+ImagestateDestroy(ImageState * is)
{
+ if (!is)
+ return;
- Efree(i->im_file);
- Efree(i->real_file);
+ Efree(is->im_file);
+ Efree(is->real_file);
- if (i->im)
- {
- EImageFree(i->im);
- i->im = NULL;
- }
+ if (is->im)
+ EImageFree(is->im);
- if (i->border)
- Efree(i->border);
+ Efree(is->border);
#if ENABLE_COLOR_MODIFIERS
- if (i->colmod)
- i->colmod->ref_count--;
+ if (is->colmod)
+ is->colmod->ref_count--;
#endif
+
+ Efree(is);
}
static void
FreeImageStateArray(ImageStateArray * isa)
{
- FreeImageState(isa->normal);
- Efree(isa->normal);
- FreeImageState(isa->hilited);
- Efree(isa->hilited);
- FreeImageState(isa->clicked);
- Efree(isa->clicked);
- FreeImageState(isa->disabled);
- Efree(isa->disabled);
+ ImagestateDestroy(isa->normal);
+ ImagestateDestroy(isa->hilited);
+ ImagestateDestroy(isa->clicked);
+ ImagestateDestroy(isa->disabled);
}
static void
@@ -362,8 +358,7 @@
ecore_list_node_remove(iclass_list, ic);
- if (ic->name)
- Efree(ic->name);
+ Efree(ic->name);
FreeImageStateArray(&(ic->norm));
FreeImageStateArray(&(ic->active));
@@ -374,6 +369,8 @@
if (ic->colmod)
ic->colmod->ref_count--;
#endif
+
+ Efree(ic);
}
ImageClass *
===================================================================
RCS file: /cvs/e/e16/e/src/iconify.c,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -3 -r1.227 -r1.228
--- iconify.c 13 Feb 2008 21:31:28 -0000 1.227
+++ iconify.c 23 Feb 2008 12:09:38 -0000 1.228
@@ -397,8 +397,7 @@
ib_sel = ct;
}
}
- if (lst)
- Efree(lst);
+ Efree(lst);
}
return ib_sel;
@@ -435,8 +434,7 @@
ct = lst[i];
IconboxUpdateEwinIcon(ct, ewin, icon_mode);
}
- if (lst)
- Efree(lst);
+ Efree(lst);
}
static void
===================================================================
RCS file: /cvs/e/e16/e/src/lang.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- lang.c 17 Jan 2007 01:10:43 -0000 1.20
+++ lang.c 23 Feb 2008 12:09:38 -0000 1.21
@@ -137,8 +137,7 @@
if (Mode.locale.utf8_int == want_utf8)
return;
- if (str)
- Efree((char *)str);
+ Efree((char *)str);
#else
str = NULL;
want_utf8 = 0;
===================================================================
RCS file: /cvs/e/e16/e/src/main.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -3 -r1.164 -r1.165
--- main.c 13 Feb 2008 21:31:29 -0000 1.164
+++ main.c 23 Feb 2008 12:09:38 -0000 1.165
@@ -502,8 +502,7 @@
static void
EConfNameSet(const char *name)
{
- if (Mode.conf.name)
- Efree(Mode.conf.name);
+ Efree(Mode.conf.name);
Mode.conf.name = Estrdup(name);
Esetenv("ECONFNAME", Mode.conf.name);
}
@@ -513,8 +512,7 @@
{
if (!strcmp(dir, EDirUser()))
return;
- if (Mode.conf.dir)
- Efree(Mode.conf.dir);
+ Efree(Mode.conf.dir);
Mode.conf.dir = Estrdup(dir);
}
@@ -523,8 +521,7 @@
{
if (!strcmp(dir, EDirUser()))
return;
- if (Mode.conf.cache_dir)
- Efree(Mode.conf.cache_dir);
+ Efree(Mode.conf.cache_dir);
Mode.conf.cache_dir = Estrdup(dir);
}
===================================================================
RCS file: /cvs/e/e16/e/src/memory.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- memory.c 17 Jan 2007 01:10:43 -0000 1.54
+++ memory.c 23 Feb 2008 12:09:38 -0000 1.55
@@ -130,8 +130,7 @@
if (!lst)
return;
while (num--)
- if (lst[num])
- Efree(lst[num]);
+ Efree(lst[num]);
Efree(lst);
}
===================================================================
RCS file: /cvs/e/e16/e/src/menus-misc.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- menus-misc.c 3 Jun 2007 11:55:29 -0000 1.45
+++ menus-misc.c 23 Feb 2008 12:09:38 -0000 1.46
@@ -510,8 +510,7 @@
}
if (iname)
{
- if (en_name)
- Efree(en_name);
+ Efree(en_name);
}
else
{
@@ -532,12 +531,9 @@
MenuAddItem(m, mi);
}
}
- if (iname)
- Efree(iname);
- if (exec)
- Efree(exec);
- if (texec)
- Efree(texec);
+ Efree(iname);
+ Efree(exec);
+ Efree(texec);
}
}
}
@@ -622,8 +618,7 @@
MenuAddItem(m, mi);
}
}
- if (lst)
- Efree(lst);
+ Efree(lst);
return m;
}
===================================================================
RCS file: /cvs/e/e16/e/src/menus.c,v
retrieving revision 1.297
retrieving revision 1.298
diff -u -3 -r1.297 -r1.298
--- menus.c 13 Feb 2008 21:31:29 -0000 1.297
+++ menus.c 23 Feb 2008 12:09:38 -0000 1.298
@@ -384,8 +384,7 @@
static void
MenuStyleSetName(MenuStyle * ms, const char *name)
{
- if (ms->name)
- Efree(ms->name);
+ Efree(ms->name);
ms->name = Estrdup(name);
}
@@ -486,8 +485,7 @@
void
MenuSetData(Menu * m, char *data)
{
- if (m->data)
- Efree(m->data);
+ Efree(m->data);
m->data = data;
}
@@ -578,14 +576,10 @@
if (m->win)
EDestroyWindow(m->win);
- if (m->name)
- Efree(m->name);
- if (m->alias)
- Efree(m->alias);
- if (m->title)
- Efree(m->title);
- if (m->data)
- Efree(m->data);
+ Efree(m->name);
+ Efree(m->alias);
+ Efree(m->title);
+ Efree(m->data);
Efree(m);
}
@@ -612,20 +606,16 @@
mi->child->ref_count--;
MenuDestroy(mi->child);
}
- if (mi->text)
- Efree(mi->text);
- if (mi->params)
- Efree(mi->params);
+ Efree(mi->text);
+ Efree(mi->params);
for (j = 0; j < 3; j++)
FreePmapMask(&(mi->pmm[j]));
if (!destroying && mi->win)
EDestroyWindow(mi->win);
ImageclassFree(mi->icon_iclass);
- if (mi)
- Efree(mi);
+ Efree(mi);
}
- if (m->items)
- Efree(m->items);
+ Efree(m->items);
m->items = NULL;
m->num = 0;
m->sel_item = NULL;
===================================================================
RCS file: /cvs/e/e16/e/src/moveresize.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- moveresize.c 13 Feb 2008 21:31:29 -0000 1.86
+++ moveresize.c 23 Feb 2008 12:09:38 -0000 1.87
@@ -227,8 +227,7 @@
DrawEwinShape(ewin, Mode_mr.mode, ewin->shape_x,
ewin->shape_y, ewin->client.w, ewin->client.h, 3, i);
}
- if (lst)
- Efree(lst);
+ Efree(lst);
EUngrabServer();
}
@@ -279,8 +278,7 @@
DrawEwinShape(ewin, Mode_mr.mode, x, y,
ewin->client.w, ewin->client.h, fl, i);
}
- if (lst)
- Efree(lst);
+ Efree(lst);
return 0;
}
===================================================================
RCS file: /cvs/e/e16/e/src/pager.c,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -3 -r1.259 -r1.260
--- pager.c 3 Feb 2008 17:00:52 -0000 1.259
+++ pager.c 23 Feb 2008 12:09:38 -0000 1.260
@@ -160,8 +160,7 @@
ecore_list_node_remove(pager_list, p);
PagerScanCancel(p);
- if (p->name)
- Efree(p->name);
+ Efree(p->name);
EDestroyWindow(p->win);
PagerHiwinHide();
if (p->bgpmap != None)
@@ -1378,8 +1377,7 @@
EwinOpMove(gwins[i], OPSRC_USER, EoGetX(gwins[i]) + dx,
EoGetY(gwins[i]) + dy);
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
static void
@@ -1524,8 +1522,7 @@
EwinIconify(gwins[i]);
}
}
- if (gwins)
- Efree(gwins);
+ Efree(gwins);
}
else if (ewin2 && ewin2->props.vroot)
{
===================================================================
RCS file: /cvs/e/e16/e/src/session.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -3 -r1.149 -r1.150
--- session.c 13 Feb 2008 21:31:29 -0000 1.149
+++ session.c 23 Feb 2008 12:09:38 -0000 1.150
@@ -248,8 +248,7 @@
props[n++] = &priorityProp;
SmcSetProperties(smc_conn, n, props);
- if (user)
- Efree(user);
+ Efree(user);
}
/* This function is usually exclusively devoted to saving data.
@@ -386,8 +385,7 @@
SmcSaveCompleteProcMask |
SmcShutdownCancelledProcMask, &callbacks,
client_id, &sm_client_id, 4096, error_string_ret);
- if (client_id)
- Efree(client_id);
+ Efree(client_id);
if (error_string_ret[0])
Eprintf("While connecting to session manager: %s.", error_string_ret);
===================================================================
RCS file: /cvs/e/e16/e/src/snaps.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -3 -r1.135 -r1.136
--- snaps.c 10 Feb 2008 20:21:53 -0000 1.135
+++ snaps.c 23 Feb 2008 12:09:38 -0000 1.136
@@ -102,22 +102,15 @@
if (sn->used)
sn->used->snap = NULL;
- if (sn->name)
- Efree(sn->name);
- if (sn->win_title)
- Efree(sn->win_title);
- if (sn->win_name)
- Efree(sn->win_name);
- if (sn->win_class)
- Efree(sn->win_class);
- if (sn->win_role)
- Efree(sn->win_role);
- if (sn->border_name)
- Efree(sn->border_name);
- if (sn->cmd)
- Efree(sn->cmd);
- if (sn->groups)
- Efree(sn->groups);
+ Efree(sn->name);
+ Efree(sn->win_title);
+ Efree(sn->win_name);
+ Efree(sn->win_class);
+ Efree(sn->win_role);
+ Efree(sn->border_name);
+ Efree(sn->cmd);
+ Efree(sn->groups);
+
Efree(sn);
}
@@ -311,8 +304,7 @@
static void
SnapEwinBorder(Snapshot * sn, const EWin * ewin)
{
- if (sn->border_name)
- Efree(sn->border_name);
+ Efree(sn->border_name);
sn->border_name = NULL;
if (ewin->previous_border)
sn->border_name = Estrdup(BorderGetName(ewin->previous_border));
@@ -389,8 +381,7 @@
strcmp(ewin->icccm.wm_machine, Mode.wm.machine_name))
return;
- if (sn->cmd)
- Efree(sn->cmd);
+ Efree(sn->cmd);
sn->cmd = Estrdup(ewin->icccm.wm_command);
}
@@ -406,8 +397,8 @@
if (!ewin->groups)
{
- if (sn->groups)
- Efree(sn->groups);
+ Efree(sn->groups);
+ sn->groups = NULL;
sn->num_groups = 0;
return;
}
@@ -427,9 +418,7 @@
sn = SnapshotEwinGet(gwins[i], SNAP_MATCH_DEFAULT);
if (sn)
{
- if (sn->groups)
- Efree(sn->groups);
-
+ Efree(sn->groups);
sn->groups = EMALLOC(int, num_groups);
sn->num_groups = num_groups;
@@ -447,8 +436,8 @@
sn = gwins[i]->snap;
if (sn)
{
- if (sn->groups)
- Efree(sn->groups);
+ Efree(sn->groups);
+ sn->groups = NULL;
sn->num_groups = 0;
}
}
===================================================================
RCS file: /cvs/e/e16/e/src/sound.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- sound.c 28 Jan 2008 21:20:09 -0000 1.58
+++ sound.c 23 Feb 2008 12:09:38 -0000 1.59
@@ -96,10 +96,9 @@
ecore_list_node_remove(sound_list, sclass);
_SclassSampleDestroy(sclass, NULL);
- if (sclass->name)
- Efree(sclass->name);
- if (sclass->file)
- Efree(sclass->file);
+ Efree(sclass->name);
+ Efree(sclass->file);
+
Efree(sclass);
}
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- tclass.c 5 Jan 2008 10:43:56 -0000 1.58
+++ tclass.c 23 Feb 2008 12:09:38 -0000 1.59
@@ -69,10 +69,13 @@
static void
TextStateDestroy(TextState * ts)
{
- if (ts->fontname)
- Efree(ts->fontname);
+ if (!ts)
+ return;
+
+ Efree(ts->fontname);
if (ts->ops)
ts->ops->Destroy(ts);
+
Efree(ts);
}
@@ -104,40 +107,24 @@
tc->ref_count);
return;
}
- if (tc->name)
- Efree(tc->name);
- if (tc->norm.normal)
- TextStateDestroy(tc->norm.normal);
- if (tc->norm.hilited)
- TextStateDestroy(tc->norm.hilited);
- if (tc->norm.clicked)
- TextStateDestroy(tc->norm.clicked);
- if (tc->norm.disabled)
- TextStateDestroy(tc->norm.disabled);
- if (tc->active.normal)
- TextStateDestroy(tc->active.normal);
- if (tc->active.hilited)
- TextStateDestroy(tc->active.hilited);
- if (tc->active.clicked)
- TextStateDestroy(tc->active.clicked);
- if (tc->active.disabled)
- TextStateDestroy(tc->active.disabled);
- if (tc->sticky.normal)
- TextStateDestroy(tc->sticky.normal);
- if (tc->sticky.hilited)
- TextStateDestroy(tc->sticky.hilited);
- if (tc->sticky.clicked)
- TextStateDestroy(tc->sticky.clicked);
- if (tc->sticky.disabled)
- TextStateDestroy(tc->sticky.disabled);
- if (tc->sticky_active.normal)
- TextStateDestroy(tc->sticky_active.normal);
- if (tc->sticky_active.hilited)
- TextStateDestroy(tc->sticky_active.hilited);
- if (tc->sticky_active.clicked)
- TextStateDestroy(tc->sticky_active.clicked);
- if (tc->sticky_active.disabled)
- TextStateDestroy(tc->sticky_active.disabled);
+ Efree(tc->name);
+ TextStateDestroy(tc->norm.normal);
+ TextStateDestroy(tc->norm.hilited);
+ TextStateDestroy(tc->norm.clicked);
+ TextStateDestroy(tc->norm.disabled);
+ TextStateDestroy(tc->active.normal);
+ TextStateDestroy(tc->active.hilited);
+ TextStateDestroy(tc->active.clicked);
+ TextStateDestroy(tc->active.disabled);
+ TextStateDestroy(tc->sticky.normal);
+ TextStateDestroy(tc->sticky.hilited);
+ TextStateDestroy(tc->sticky.clicked);
+ TextStateDestroy(tc->sticky.disabled);
+ TextStateDestroy(tc->sticky_active.normal);
+ TextStateDestroy(tc->sticky_active.hilited);
+ TextStateDestroy(tc->sticky_active.clicked);
+ TextStateDestroy(tc->sticky_active.disabled);
+
Efree(tc);
}
@@ -178,7 +165,6 @@
static void
TextclassPopulate(TextClass * tclass)
{
-
if (!tclass)
return;
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- text.c 4 Jan 2008 22:55:41 -0000 1.96
+++ text.c 23 Feb 2008 12:09:38 -0000 1.97
@@ -391,8 +391,7 @@
Efree(text);
*ptext = new_line;
done:
- if (wc_line)
- Efree(wc_line);
+ Efree(wc_line);
EwcClose();
}
===================================================================
RCS file: /cvs/e/e16/e/src/theme.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- theme.c 7 Aug 2007 15:05:08 -0000 1.67
+++ theme.c 23 Feb 2008 12:09:38 -0000 1.68
@@ -106,10 +106,8 @@
tmp2 = fileof(str[i]);
if ((tmp != NULL) && (tmp2 != NULL) && (!strcmp(tmp, tmp2)))
already = 1;
- if (tmp)
- Efree(tmp);
- if (tmp2)
- Efree(tmp2);
+ Efree(tmp);
+ Efree(tmp2);
}
if (already)
@@ -421,12 +419,10 @@
EDirRoot(), EDirUser());
}
- if (Conf.theme.name)
- Efree(Conf.theme.name);
+ Efree(Conf.theme.name);
Conf.theme.name = (theme) ? fullfileof(theme) : NULL;
- if (Mode.theme.path)
- Efree(Mode.theme.path);
+ Efree(Mode.theme.path);
Mode.theme.path = theme;
}
===================================================================
RCS file: /cvs/e/e16/e/src/timers.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- timers.c 26 Jan 2008 11:43:12 -0000 1.33
+++ timers.c 23 Feb 2008 12:09:38 -0000 1.34
@@ -122,8 +122,7 @@
qe->func(qe->runtime_val, qe->runtime_data);
/* free the timer */
- if (qe->name)
- Efree(qe->name);
+ Efree(qe->name);
Efree(qe);
}
@@ -164,10 +163,8 @@
else
q_first = qe->next;
/* free it */
- if (qe->name)
- Efree(qe->name);
- if (qe)
- Efree(qe);
+ Efree(qe->name);
+ Efree(qe);
/* done */
return 1;
}
@@ -303,8 +300,7 @@
#endif
ecore_list_node_remove(animator_list, an);
- if (an->name)
- Efree(an->name);
+ Efree(an->name);
Efree(an);
if (ecore_list_count(animator_list) == 0)
===================================================================
RCS file: /cvs/e/e16/e/src/tooltips.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -3 -r1.121 -r1.122
--- tooltips.c 3 Nov 2007 10:25:11 -0000 1.121
+++ tooltips.c 23 Feb 2008 12:09:38 -0000 1.122
@@ -661,8 +661,7 @@
}
}
- if (heights)
- Efree(heights);
+ Efree(heights);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/util.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- util.h 23 Feb 2008 11:52:44 -0000 1.14
+++ util.h 23 Feb 2008 12:09:38 -0000 1.15
@@ -56,8 +56,12 @@
#include <stdlib.h>
#define Ecalloc calloc
#define Emalloc malloc
-#define Efree free
#define Erealloc realloc
+#if HAVE_FREE_NULL_BUG
+#define Efree(p) if (p) free(p)
+#else
+#define Efree free
+#endif
#define ECALLOC(type, num) (type*)Ecalloc(num, sizeof(type))
#define EMALLOC(type, num) (type*)Emalloc((num)*sizeof(type))
===================================================================
RCS file: /cvs/e/e16/e/src/warp.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- warp.c 19 Jan 2008 13:44:54 -0000 1.109
+++ warp.c 23 Feb 2008 12:09:38 -0000 1.110
@@ -281,8 +281,7 @@
if (fw && EoIsShown(fw))
WarpFocusWinHide(fw);
- if (warplist)
- Efree(warplist);
+ Efree(warplist);
warplist = NULL;
warplist_num = 0;
}
===================================================================
RCS file: /cvs/e/e16/e/src/windowmatch.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- windowmatch.c 10 Feb 2008 20:21:53 -0000 1.65
+++ windowmatch.c 23 Feb 2008 12:09:38 -0000 1.66
@@ -123,12 +123,9 @@
ecore_list_node_remove(wm_list, wm);
- if (wm->name)
- Efree(wm->name);
- if (wm->value)
- Efree(wm->value);
- if (wm->args)
- Efree(wm->args);
+ Efree(wm->name);
+ Efree(wm->value);
+ Efree(wm->args);
Efree(wm);
}
@@ -659,7 +656,7 @@
return;
case EWIN_OP_TITLE:
- _EFREE(EwinGetIcccmName(ewin));
+ Efree(EwinGetIcccmName(ewin));
EwinGetIcccmName(ewin) = Estrdup(args);
break;
===================================================================
RCS file: /cvs/e/e16/e/src/x.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -3 -r1.169 -r1.170
--- x.c 13 Feb 2008 21:31:29 -0000 1.169
+++ x.c 23 Feb 2008 12:09:38 -0000 1.170
@@ -128,8 +128,7 @@
#endif
if (win->rects)
XFree(win->rects);
- if (win->cbl.lst)
- Efree(win->cbl.lst);
+ Efree(win->cbl.lst);
Efree(win);
}
@@ -1499,8 +1498,7 @@
return win->num_rect;
bail_out:
- if (rects)
- Efree(rects);
+ Efree(rects);
EShapeCombineMask(win, ShapeBounding, 0, 0, None, ShapeSet);
return 0;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs