From: Matthew Fernandez Date: Wed, 21 Dec 2022 05:09:52 +0000 (-0800) Subject: smyrna new_attr: remove shadowing of global 'attr' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=392c0526b4e2cb08f679cd8d663ebd0c4843f152;p=graphviz smyrna new_attr: remove shadowing of global 'attr' Note that none of the zero assignments in this function were necessary because `gv_alloc` zeros memory. --- diff --git a/cmd/smyrna/gui/frmobjectui.c b/cmd/smyrna/gui/frmobjectui.c index 4cc934135..fca4c4fa2 100644 --- a/cmd/smyrna/gui/frmobjectui.c +++ b/cmd/smyrna/gui/frmobjectui.c @@ -61,17 +61,7 @@ static void free_attr(attr_t *at) { } static attr_t *new_attr(void) { - attr_t *attr = gv_alloc(sizeof(attr_t)); - attr->defValG = NULL; - attr->defValN = NULL; - attr->defValE = NULL; - attr->name = NULL; - attr->value = NULL; - attr->propagate = 0; - attr->objType[0] = 0; - attr->objType[1] = 0; - attr->objType[2] = 0; - return attr; + return gv_alloc(sizeof(attr_t)); } static attr_t *new_attr_with_ref(Agsym_t * sym)