summaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2017-03-10 14:28:37 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-03-13 23:11:45 +0100
commit66de563482c0fd4324e1eae19809d2499e3c4fa8 (patch)
treebf3178878ebe2461388e8fec01e321173ffe30f8 /lib/hash.c
parentdb87bcfcf21f8c3b8188d0c5ab82faf804ffd5ea (diff)
downloadcurl-66de563482c0fd4324e1eae19809d2499e3c4fa8.tar.gz
Improve code readbility
... by removing the else branch after a return, break or continue. Closes #1310
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 065504235..c26be0118 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -91,10 +91,8 @@ Curl_hash_init(struct curl_hash *h,
}
return 0; /* fine */
}
- else {
- h->slots = 0;
- return 1; /* failure */
- }
+ h->slots = 0;
+ return 1; /* failure */
}
static struct curl_hash_element *
@@ -347,10 +345,8 @@ Curl_hash_next_element(struct curl_hash_iterator *iter)
struct curl_hash_element *he = iter->current_element->ptr;
return he;
}
- else {
- iter->current_element = NULL;
- return NULL;
- }
+ iter->current_element = NULL;
+ return NULL;
}
#if 0 /* useful function for debugging hashes and their contents */