};
void string_hash_func(const void *p, struct siphash *state) {
- siphash24_compress(p, strlen(p), state);
+ siphash24_compress(p, strlen(p) + 1, state);
}
int string_compare_func(const void *a, const void *b) {
assert(id->length);
assert(id->data);
+ siphash24_compress(&id->length, sizeof(id->length), state);
siphash24_compress(id->data, id->length, state);
}
assert(id);
assert(id->data);
+ siphash24_compress(&id->length, sizeof(id->length), state);
siphash24_compress(id->data, id->length, state);
}
static void member_hash_func(const void *p, struct siphash *state) {
const Member *m = p;
+ uint64_t arity = 1;
assert(m);
assert(m->type);
string_hash_func(m->type, state);
+ arity += !!m->name + !!m->interface;
+
+ uint64_hash_func(&arity, state);
+
if (m->name)
string_hash_func(m->name, state);
if (k > 0)
r = k;
+ if (r == 0)
+ break;
+
label[r] = 0;
ascii_strlower(label);
string_hash_func(label, state);
}
+
+ /* enforce that all names are terminated by the empty label */
+ string_hash_func("", state);
}
int dns_name_compare_func(const void *a, const void *b) {