summaryrefslogtreecommitdiffhomepage
path: root/ir/adt
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2015-12-06 22:38:19 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2015-12-07 18:41:49 +0100
commit4075c5421f35fe15adb08b9e3ae189a13ab7e408 (patch)
tree3d98c31fb57018200b462ad593d50a369f975f66 /ir/adt
parent31f3d128912d1097c070fee3bc46a122da28c181 (diff)
adt: Add and use 'streq()'.
Diffstat (limited to 'ir/adt')
-rw-r--r--ir/adt/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ir/adt/util.h b/ir/adt/util.h
index 23ebc7c..9e704a1 100644
--- a/ir/adt/util.h
+++ b/ir/adt/util.h
@@ -64,4 +64,9 @@ static inline bool is_digit(char const c)
return '0' <= c && c <= '9';
}
+static inline bool streq(char const *const a, char const *const b)
+{
+ return strcmp(a, b) == 0;
+}
+
#endif