diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-10-14 09:44:06 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-10-14 09:44:06 +0200 |
commit | 628290b5e69be62ee2df3df8a88b506cf2f43d6b (patch) | |
tree | 58158c4ecca91ebb58818cabde49e54ca6d93dd6 /lib/conncache.c | |
parent | c2d5f2ef983f752fca654aba9bcd1383698bdc04 (diff) | |
download | curl-628290b5e69be62ee2df3df8a88b506cf2f43d6b.tar.gz |
cleanups: reduce variable scope
cppcheck pointed these out.
Diffstat (limited to 'lib/conncache.c')
-rw-r--r-- | lib/conncache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/conncache.c b/lib/conncache.c index 5bbcf3c86..c7e058592 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -199,7 +199,6 @@ void Curl_conncache_foreach(struct conncache *connc, he = Curl_hash_next_element(&iter); while(he) { struct connectbundle *bundle; - struct connectdata *conn; bundle = he->ptr; he = Curl_hash_next_element(&iter); @@ -208,7 +207,7 @@ void Curl_conncache_foreach(struct conncache *connc, while(curr) { /* Yes, we need to update curr before calling func(), because func() might decide to remove the connection */ - conn = curr->ptr; + struct connectdata *conn = curr->ptr; curr = curr->next; if(1 == func(conn, param)) @@ -223,7 +222,6 @@ struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc) { struct curl_hash_iterator iter; - struct curl_llist_element *curr; struct curl_hash_element *he; struct connectbundle *bundle; @@ -231,6 +229,7 @@ Curl_conncache_find_first_connection(struct conncache *connc) he = Curl_hash_next_element(&iter); while(he) { + struct curl_llist_element *curr; bundle = he->ptr; curr = bundle->conn_list->head; |