mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-04-19 21:22:15 +03:00
Fix -Wlogical-not-parentheses warning (#79)
* Fix -Wlogical-not-parentheses warning The warning occurs because `operator!()` has higher precedence than `operator>()`. Alternatively, we can use: ``` iClient->connect(iServerAddress, iServerPort) <= 0 ```
This commit is contained in:
parent
7f36561e0b
commit
9a5afdfc74
@ -84,7 +84,7 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
|
||||
{
|
||||
if (iServerName)
|
||||
{
|
||||
if (!iClient->connect(iServerName, iServerPort) > 0)
|
||||
if (!(iClient->connect(iServerName, iServerPort) > 0))
|
||||
{
|
||||
#ifdef LOGGING
|
||||
Serial.println("Connection failed");
|
||||
@ -94,7 +94,7 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!iClient->connect(iServerAddress, iServerPort) > 0)
|
||||
if (!(iClient->connect(iServerAddress, iServerPort) > 0))
|
||||
{
|
||||
#ifdef LOGGING
|
||||
Serial.println("Connection failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user