>From 391aae98971e5e7b0fe6315716551678c66cb0e1 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <[email protected]>
Date: Sat, 5 May 2012 09:12:47 +0200
Subject: [PATCH] Get rid of NEW definition.

The NEW definition merely calls wmalloc now, therefore it is not needed
anymore.  Pointed out and requested by Carlos R. Mafra.
---
 WPrefs.app/Menu.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index e9eaa9b..4a8cc94 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -155,8 +155,6 @@ static char *commandNames[] = {
        "LEGAL_PANEL"
 };
 
-#define NEW(type) wmalloc(sizeof(type))
-
 #define ICON_FILE      "menus"
 
 static void showData(_Panel * panel);
@@ -317,7 +315,7 @@ static ItemData *putNewItem(_Panel * panel, WEditMenu * 
menu, int type, char *ti
 
        item = WAddMenuItemWithTitle(menu, title);
 
-       data = NEW(ItemData);
+       data = wmalloc(sizeof(ItemData));
        data->type = type;
        WSetEditMenuItemData(item, data, (WMCallback *) freeItemData);
        WSetEditMenuItemImage(item, panel->markerPix[type]);
@@ -856,7 +854,7 @@ static void freeItemData(ItemData * data)
 
 static ItemData *parseCommand(WMPropList * item)
 {
-       ItemData *data = NEW(ItemData);
+       ItemData *data = wmalloc(sizeof(ItemData));
        WMPropList *p;
        char *command = NULL;
        char *parameter = NULL;
@@ -1156,7 +1154,7 @@ menuItemCloned(WEditMenuDelegate * delegate, WEditMenu * 
menu, WEditMenuItem * o
 
 #define DUP(s) (s) ? wstrdup(s) : NULL
 
-       newData = NEW(ItemData);
+       newData = wmalloc(sizeof(ItemData));
 
        newData->type = data->type;
 
-- 
1.7.6


-- 
To unsubscribe, send mail to [email protected].

Reply via email to