drop some remaining `NEW*' macros, use TMALLOC instead

This commit is contained in:
rlar 2015-12-19 19:27:31 +01:00
parent 9546b178fb
commit 9473ec575f
2 changed files with 2 additions and 7 deletions

View File

@ -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;

View File

@ -123,8 +123,6 @@ struct _keyed {
};
#define NEWGRAPH TMALLOC(GRAPH, 1)
#define rnd(x) (int) ((x)+0.5)
#endif