]> git.meshlink.io Git - meshlink/blobdiff - src/hash.c
Add an astylerc file and reformat all code.
[meshlink] / src / hash.c
index aabd94c7d42cd0f51dfefbfb3769e26976df3ba4..e0733386471a0f0f81070b7b225af3539296f006 100644 (file)
@@ -76,9 +76,8 @@ void hash_insert(hash_t *hash, const void *key, const void *value) {
 
 void *hash_search(const hash_t *hash, const void *key) {
        uint32_t i = modulo(hash_function(key, hash->size), hash->n);
-       if(hash->values[i] && !memcmp(key, hash->keys + i * hash->size, hash->size)) {
+       if(hash->values[i] && !memcmp(key, hash->keys + i * hash->size, hash->size))
                return (void *)hash->values[i];
-       }
        return NULL;
 }