diff options
author | David Robillard <d@drobilla.net> | 2011-12-12 06:01:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-12 06:01:17 +0000 |
commit | 0ddb866a84866b1102968d7b55dc6702dca52e4a (patch) | |
tree | de301f17cd72bf55457934aaa689ef7fcc2e97bf /src/node.c | |
parent | 22ac239266b01f067ece83eb6addcdc9f825780e (diff) | |
download | serd-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/node.c')
-rw-r--r-- | src/node.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |