From d3815dfd3e7f48e0c47499acc173809d973a4ad6 Mon Sep 17 00:00:00 2001 From: linus Date: Mon, 8 Mar 2010 21:54:42 +0000 Subject: Reindent and remove trailing whitespace. git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@517 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- hash.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 2b4c0e2..e5d5881 100644 --- a/hash.c +++ b/hash.c @@ -29,7 +29,7 @@ struct hash *hash_create() { /* frees all memory associated with the hash */ void hash_destroy(struct hash *h) { struct list_node *ln; - + if (!h) return; for (ln = list_first(h->hashlist); ln; ln = list_next(ln)) { @@ -73,15 +73,15 @@ int hash_insert(struct hash *h, void *key, uint32_t keylen, void *data) { void *hash_read(struct hash *h, void *key, uint32_t keylen) { struct list_node *ln; struct hash_entry *e; - + if (!h) return 0; pthread_mutex_lock(&h->mutex); for (ln = list_first(h->hashlist); ln; ln = list_next(ln)) { e = (struct hash_entry *)ln->data; if (e->keylen == keylen && !memcmp(e->key, key, keylen)) { - pthread_mutex_unlock(&h->mutex); - return e->data; + pthread_mutex_unlock(&h->mutex); + return e->data; } } pthread_mutex_unlock(&h->mutex); @@ -92,7 +92,7 @@ void *hash_read(struct hash *h, void *key, uint32_t keylen) { void *hash_extract(struct hash *h, void *key, uint32_t keylen) { struct list_node *ln; struct hash_entry *e; - + if (!h) return 0; pthread_mutex_lock(&h->mutex); -- cgit v1.1