From: Matthew Fernandez Date: Sat, 14 Nov 2020 20:45:29 +0000 (-0800) Subject: abbreviate some comparisons against boolean literals X-Git-Tag: 2.46.1~31^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cac3f9c8f18553b272387a9701a5d0c7762bc2f0;p=graphviz abbreviate some comparisons against boolean literals --- diff --git a/lib/common/ns.c b/lib/common/ns.c index aaef487dd..39ba436d0 100644 --- a/lib/common/ns.c +++ b/lib/common/ns.c @@ -49,9 +49,9 @@ static int add_tree_edge(edge_t * e) } ED_tree_index(e) = Tree_edge.size; Tree_edge.list[Tree_edge.size++] = e; - if (ND_mark(agtail(e)) == FALSE) + if (!ND_mark(agtail(e))) Tree_node.list[Tree_node.size++] = agtail(e); - if (ND_mark(aghead(e)) == FALSE) + if (!ND_mark(aghead(e))) Tree_node.list[Tree_node.size++] = aghead(e); n = agtail(e); ND_mark(n) = TRUE; @@ -184,7 +184,7 @@ static void dfs_enter_outedge(node_t * v) edge_t *e; for (i = 0; (e = ND_out(v).list[i]); i++) { - if (TREE_EDGE(e) == FALSE) { + if (!TREE_EDGE(e)) { if (!SEQ(Low, ND_lim(aghead(e)), Lim)) { slack = SLACK(e); if (slack < Slack || Enter == NULL) { @@ -206,7 +206,7 @@ static void dfs_enter_inedge(node_t * v) edge_t *e; for (i = 0; (e = ND_in(v).list[i]); i++) { - if (TREE_EDGE(e) == FALSE) { + if (!TREE_EDGE(e)) { if (!SEQ(Low, ND_lim(agtail(e)), Lim)) { slack = SLACK(e); if (slack < Slack || Enter == NULL) { @@ -1156,7 +1156,7 @@ static node_t *checkdfs(graph_t* g, node_t * n) return w; } else { - if (ND_mark(w) == FALSE) { + if (!ND_mark(w)) { x = checkdfs(g, w); if (x) { fprintf(stderr,"unwind %lx %s(%lx)\n",