From: Matthew Fernandez Date: Sun, 22 Nov 2020 05:55:38 +0000 (-0800) Subject: remove micro-optimization in streq() X-Git-Tag: 2.46.1~27^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a890570ff22ac09ad656897fba395c1b070fb916;p=graphviz remove micro-optimization in streq() Modern compilers can already do tricks like this as they know strcmp() through __builtin_strcmp(). --- diff --git a/lib/common/macros.h b/lib/common/macros.h index be1b5efa5..7667193da 100644 --- a/lib/common/macros.h +++ b/lib/common/macros.h @@ -33,7 +33,7 @@ #define EDGE_TYPE(g) (GD_flags(g) & (7 << 1)) #ifndef streq -#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b)) +#define streq(a,b) (!strcmp(a,b)) #endif #define XPAD(d) ((d).x += 4*GAP)