From c0ad4e963562051fe775be181e8a114fef6e0818 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 7 Jul 2021 21:28:58 -0700 Subject: [PATCH] remove some unnecessary bracketing --- lib/cgraph/attr.c | 2 +- lib/cgraph/grammar.y | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cgraph/attr.c b/lib/cgraph/attr.c index 0924bafb9..82c15c805 100644 --- a/lib/cgraph/attr.c +++ b/lib/cgraph/attr.c @@ -299,7 +299,7 @@ static Agsym_t *setattr(Agraph_t * g, int kind, char *name, char *value) rv = rsym; } } - if (rv && (kind == AGRAPH)) + if (rv && kind == AGRAPH) agxset(g, rv, value); agmethod_upd(g, g, rv); return rv; diff --git a/lib/cgraph/grammar.y b/lib/cgraph/grammar.y index 8694e1374..610eefc08 100644 --- a/lib/cgraph/grammar.y +++ b/lib/cgraph/grammar.y @@ -281,7 +281,7 @@ static void bindattrs(int kind) for (aptr = S->attrlist.first; aptr; aptr = aptr->next) { assert(aptr->tag == T_atom); /* signifies unbound attr */ name = aptr->u.name; - if ((kind == AGEDGE) && streq(name,Key)) continue; + if (kind == AGEDGE && streq(name,Key)) continue; if ((aptr->u.asym = agattr(S->g,kind,name,NULL)) == NULL) aptr->u.asym = agattr(S->g,kind,name,""); aptr->tag = T_attr; /* signifies bound attr */ @@ -301,7 +301,7 @@ static void applyattrs(void *obj) } } else { - assert((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)); + assert(AGTYPE(obj) == AGINEDGE || AGTYPE(obj) == AGOUTEDGE); assert(aptr->tag == T_atom); assert(streq(aptr->u.name,Key)); } -- 2.40.0