From 9473ec575fcf08e74e0543c6a60536d7c02d56ac Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 19 Dec 2015 19:27:31 +0100 Subject: [PATCH] drop some remaining `NEW*' macros, use TMALLOC instead --- src/frontend/plotting/graphdb.c | 7 ++----- src/include/ngspice/graph.h | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/frontend/plotting/graphdb.c b/src/frontend/plotting/graphdb.c index c81cea78d..eda576f9d 100644 --- a/src/frontend/plotting/graphdb.c +++ b/src/frontend/plotting/graphdb.c @@ -33,8 +33,6 @@ typedef struct listgraph { struct listgraph *next; } LISTGRAPH; -#define NEWLISTGRAPH TMALLOC(LISTGRAPH, 1) - #define NUMGBUCKETS 16 typedef struct gbucket { @@ -64,7 +62,7 @@ NewGraph(void) LISTGRAPH *list; int BucketId = RunningId % NUMGBUCKETS; - if ((list = NEWLISTGRAPH) == NULL) { + if ((list = TMALLOC(LISTGRAPH, 1)) == NULL) { internalerror("can't allocate a listgraph"); return (NULL); } @@ -244,7 +242,6 @@ typedef struct gcstack { } GCSTACK; GCSTACK *gcstacktop; -#define NEWGCSTACK TMALLOC(GCSTACK, 1) /* note: This Push and Pop has tricky semantics. @@ -255,7 +252,7 @@ GCSTACK *gcstacktop; void PushGraphContext(GRAPH *graph) { - GCSTACK *gcstack = NEWGCSTACK; + GCSTACK *gcstack = TMALLOC(GCSTACK, 1); if (!gcstacktop) { gcstacktop = gcstack; diff --git a/src/include/ngspice/graph.h b/src/include/ngspice/graph.h index a57e7e370..16149da14 100644 --- a/src/include/ngspice/graph.h +++ b/src/include/ngspice/graph.h @@ -123,8 +123,6 @@ struct _keyed { }; -#define NEWGRAPH TMALLOC(GRAPH, 1) - #define rnd(x) (int) ((x)+0.5) #endif