summaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtc.h b/dtc.h
index bb0b91b..758eb7c 100644
--- a/dtc.h
+++ b/dtc.h
@@ -67,8 +67,8 @@ typedef uint32_t cell_t;
#define streq(a, b) (strcmp((a), (b)) == 0)
-#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
#define strstarts(s, prefix) (strncmp((s), (prefix), strlen(prefix)) == 0)
+#define strprefixeq(a, n, b) (strlen(b) == (n) && (memcmp(a, b, n) == 0))
#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))