aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-12 06:01:17 +0000
committerDavid Robillard <d@drobilla.net>2011-12-12 06:01:17 +0000
commit0ddb866a84866b1102968d7b55dc6702dca52e4a (patch)
treede301f17cd72bf55457934aaa689ef7fcc2e97bf /src
parent22ac239266b01f067ece83eb6addcdc9f825780e (diff)
downloadserd-0ddb866a84866b1102968d7b55dc6702dca52e4a.tar.gz
serd-0ddb866a84866b1102968d7b55dc6702dca52e4a.tar.bz2
serd-0ddb866a84866b1102968d7b55dc6702dca52e4a.zip
Use memcmp instead of strcmp for serd_node_equals.
git-svn-id: http://svn.drobilla.net/serd/trunk@255 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src')
-rw-r--r--src/node.c5
1 files 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