summaryrefslogtreecommitdiff
path: root/http/http_client.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-10-07 21:41:22 +0300
committerEd Tanous <ed@tanous.net>2020-10-09 20:22:02 +0300
commit3174e4dfd3185c131a07371b4b5a5b40cf0e0bdb (patch)
tree10d3d0cf46070704c775cb2bd2f190575aedd49e /http/http_client.hpp
parentfc76b8ac6c2d9907ffd4618d22753db95c40953d (diff)
downloadbmcweb-3174e4dfd3185c131a07371b4b5a5b40cf0e0bdb.tar.xz
Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes have landed for the various static analysis checks, lets see how close we are. This includes bringing a bunch of the code up to par with the checks that require. Most of them fall into the category of extraneous else statements, const correctness problems, or extra copies. Tested: CI only. Unit tests pass. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912
Diffstat (limited to 'http/http_client.hpp')
-rw-r--r--http/http_client.hpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/http/http_client.hpp b/http/http_client.hpp
index 93c2a60d08..cc30cab8bd 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -222,16 +222,13 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
state = ConnState::terminated;
return;
}
- else if (retryPolicyAction == "SuspendRetries")
+ if (retryPolicyAction == "SuspendRetries")
{
state = ConnState::suspended;
return;
}
- else
- {
- // keep retrying, reset count and continue.
- retryCount = 0;
- }
+ // keep retrying, reset count and continue.
+ retryCount = 0;
}
if ((state == ConnState::connectFailed) ||
@@ -265,11 +262,8 @@ class HttpClient : public std::enable_shared_from_this<HttpClient>
});
return;
}
- else
- {
- // reset retry count.
- retryCount = 0;
- }
+ // reset retry count.
+ retryCount = 0;
connStateCheck();
return;