From 2b734a7ec429825c7007c1093883229e069d36c7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 8 Jul 2019 15:48:59 +0200 Subject: Apply various suggestions by cppcheck Reported-By: cppcheck --- methods/http.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'methods/http.cc') diff --git a/methods/http.cc b/methods/http.cc index a4d187189..0a29109fb 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -349,7 +349,7 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std: Out.Read(Req.str()); // Writing from proxy - while (Out.WriteSpace() > 0) + while (Out.WriteSpace()) { if (WaitFd(Fd->Fd(), true, Timeout) == false) { @@ -363,7 +363,7 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std: } } - while (In.ReadSpace() > 0) + while (In.ReadSpace()) { if (WaitFd(Fd->Fd(), false, Timeout) == false) { @@ -389,7 +389,7 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std: return ResultState::TRANSIENT_ERROR; } - if (In.WriteSpace() > 0) + if (In.WriteSpace()) { // Maybe there is actual data already read, if so we need to buffer it std::unique_ptr NewFd(new HttpConnectFd()); -- cgit v1.2.3