From 0ddb866a84866b1102968d7b55dc6702dca52e4a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Dec 2011 06:01:17 +0000 Subject: Use memcmp instead of strcmp for serd_node_equals. git-svn-id: http://svn.drobilla.net/serd/trunk@255 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/node.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node.c b/src/node.c index 35c294f7..09660f74 100644 --- a/src/node.c +++ b/src/node.c @@ -53,8 +53,9 @@ serd_node_equals(const SerdNode* a, const SerdNode* b) || (a->type == b->type && a->n_bytes == b->n_bytes && a->n_chars == b->n_chars - && ((a->buf == b->buf) || !strcmp((const char*)a->buf, - (const char*)b->buf))); + && ((a->buf == b->buf) || !memcmp((const char*)a->buf, + (const char*)b->buf, + a->n_bytes + 1))); } static size_t -- cgit v1.2.1