From: glenlow Date: Tue, 26 Feb 2008 03:35:43 +0000 (+0000) Subject: removed redundant memset after N_NEW of didset field [emdengansner] X-Git-Tag: LAST_LIBGRAPH~32^2~4704 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97ec8280c4d14000d963d4cfc6dc8a7740e8f003;p=graphviz removed redundant memset after N_NEW of didset field [emdengansner] --- diff --git a/lib/graph/graph.c b/lib/graph/graph.c index 507ee6fa2..bf8a7761f 100644 --- a/lib/graph/graph.c +++ b/lib/graph/graph.c @@ -218,7 +218,6 @@ static Agraph_t *agNEWgraph(char *name, Agraph_t * parent, int kind) if (nobj) { g->attr = N_NEW(nobj, char *); g->didset = N_NEW((nobj + CHAR_BIT - 1) / CHAR_BIT, char); - memset(g->didset, 0, (nobj + CHAR_BIT - 1) / CHAR_BIT); } else { g->attr = NULL; @@ -233,7 +232,6 @@ static Agraph_t *agNEWgraph(char *name, Agraph_t * parent, int kind) if (nobj) { g->attr = N_NEW(nobj, char *); g->didset = N_NEW((nobj + CHAR_BIT - 1) / CHAR_BIT, char); - memset(g->didset, 0, (nobj + CHAR_BIT - 1) / CHAR_BIT); } else { g->attr = NULL; diff --git a/lib/graph/node.c b/lib/graph/node.c index 659600585..b1e90dcdd 100644 --- a/lib/graph/node.c +++ b/lib/graph/node.c @@ -122,7 +122,6 @@ Agnode_t *agNEWnode(Agraph_t * subg, char *name, Agnode_t * proto) if (nobj) { n->attr = N_NEW(nobj, char *); n->didset = N_NEW((nobj + CHAR_BIT - 1) / CHAR_BIT, char); - memset(n->didset, 0, (nobj + CHAR_BIT - 1) / CHAR_BIT); } else { n->attr = NULL;