summaryrefslogtreecommitdiffstats
path: root/src/sord.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sord.c')
-rw-r--r--src/sord.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sord.c b/src/sord.c
index 218c152..228bbac 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -169,10 +169,12 @@ sord_node_record_key(const SordNode* n)
static size_t
sord_node_hash(const SordNode* const node)
{
+ const size_t head = node->node.type;
+
size_t hash = 0U;
hash = zix_digest(hash, (const uint8_t*)node->node.buf, node->node.n_bytes);
- hash = zix_digest(hash, &node->node.type, sizeof(node->node.type));
+ hash = zix_digest(hash, &head, sizeof(head));
if (node->node.type == SERD_LITERAL) {
hash = zix_digest(hash, &node->meta.lit, sizeof(node->meta.lit));
}