From 0eb3d15ccb419bfda41ee31bdbf73c36facc7388 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 23 Oct 2014 22:56:35 +0200 Subject: code cleanup: we prefer 'CURLcode result' ... for the local variable name in functions holding the return code. Using the same name universally makes code easier to read and follow. Also, unify code for checking for CURLcode errors with: if(result) or if(!result) instead of if(result == CURLE_OK), if(CURLE_OK == result) or if(result != CURLE_OK) --- lib/conncache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/conncache.c') diff --git a/lib/conncache.c b/lib/conncache.c index c7e058592..9522aeb10 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -131,7 +131,7 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, conn->host.name); if(!bundle) { result = Curl_bundle_create(data, &new_bundle); - if(result != CURLE_OK) + if(result) return result; if(!conncache_add_bundle(data->state.conn_cache, @@ -143,7 +143,7 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc, } result = Curl_bundle_add_conn(bundle, conn); - if(result != CURLE_OK) { + if(result) { if(new_bundle) conncache_remove_bundle(data->state.conn_cache, new_bundle); return result; -- cgit v1.2.3