hashindex: simplify assert

This commit is contained in:
Thomas Waldmann 2023-02-08 15:05:18 +01:00
parent c9573c04ac
commit 83e6b4269e
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -763,10 +763,9 @@ hashindex_set(HashIndex *index, const unsigned char *key, const void *value)
assert(BUCKET_IS_EMPTY(index, start_idx));
idx = start_idx;
}
} else if(BUCKET_IS_DELETED(index, idx)) {
/* as expected, nothing to do */
} else {
assert(0); /* bucket is full, must not happen! */
/* Bucket must be either EMPTY (see above) or DELETED. */
assert(BUCKET_IS_DELETED(index, idx));
}
ptr = BUCKET_ADDR(index, idx);
memcpy(ptr, key, index->key_size);