clean up, remove multiple warnings

This commit is contained in:
Max Lv
2014-01-05 15:06:24 +08:00
parent 438e1e4ec7
commit 2eac55562b
9 changed files with 57 additions and 48 deletions
+3 -2
View File
@@ -95,6 +95,9 @@ int cache_remove(struct cache *cache, char *key)
if (tmp)
{
HASH_DEL(cache->entries, tmp);
if (cache->free_cb)
cache->free_cb(tmp->data);
free(tmp);
}
return 0;
@@ -119,7 +122,6 @@ int cache_remove(struct cache *cache, char *key)
*/
int cache_lookup(struct cache *cache, char *key, void *result)
{
int rv;
struct cache_entry *tmp = NULL;
char **dirty_hack = result;
@@ -160,7 +162,6 @@ int cache_insert(struct cache *cache, char *key, void *data)
struct cache_entry *entry = NULL;
struct cache_entry *tmp_entry = NULL;
size_t key_len = 0;
int rv;
if (!cache || !data)
return EINVAL;