diff options
Diffstat (limited to 'ckcapi-util.c')
-rw-r--r-- | ckcapi-util.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ckcapi-util.c b/ckcapi-util.c index 4078ab5..3c587ac 100644 --- a/ckcapi-util.c +++ b/ckcapi-util.c @@ -151,7 +151,7 @@ ckcapi_array_remove_range(CkCapiArray* parray, unsigned int index, size_t length if(index >= array->pub.len) return; - if(index + length > array->pub.len); + if(index + length > array->pub.len) length = array->pub.len - index; if(length == 0) return; @@ -187,8 +187,6 @@ ckcapi_array_remove_range(CkCapiArray* parray, unsigned int index, size_t length */ -#define KEY_DATA(he) ((he)->key) - /* * The internal form of a hash table. * @@ -375,7 +373,7 @@ find_entry(CkCapiHash* ht, const void* key, size_t klen, const void* val) he; hep = &he->next, he = *hep) { if(he->hash == hash && he->klen == klen && - memcmp(KEY_DATA(he), key, klen) == 0) + memcmp(he->key, key, klen) == 0) break; } |