1
0
mirror of https://github.com/arduino-libraries/ArduinoHttpClient.git synced 2025-04-19 21:22:15 +03:00

Make bracket style consistent

This commit is contained in:
Sandeep Mistry 2016-07-05 09:21:08 -04:00
parent f9f75fb6ea
commit e36394733e
2 changed files with 7 additions and 3 deletions

View File

@ -78,7 +78,8 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
if (iConnectionClose || !iClient->connected()) if (iConnectionClose || !iClient->connected())
{ {
if (iServerName) { if (iServerName)
{
if (!iClient->connect(iServerName, iServerPort) > 0) if (!iClient->connect(iServerName, iServerPort) > 0)
{ {
#ifdef LOGGING #ifdef LOGGING
@ -86,7 +87,9 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
#endif #endif
return HTTP_ERROR_CONNECTION_FAILED; return HTTP_ERROR_CONNECTION_FAILED;
} }
} else { }
else
{
if (!iClient->connect(iServerAddress, iServerPort) > 0) if (!iClient->connect(iServerAddress, iServerPort) > 0)
{ {
#ifdef LOGGING #ifdef LOGGING

View File

@ -340,7 +340,8 @@ int WebSocketClient::read(uint8_t *aBuffer, size_t aSize)
// unmask the RX data if needed // unmask the RX data if needed
if (iRxMasked) if (iRxMasked)
{ {
for (int i = 0; i < (int)aSize; i++, iRxMaskIndex++) { for (int i = 0; i < (int)aSize; i++, iRxMaskIndex++)
{
aBuffer[i] ^= iRxMaskKey[iRxMaskIndex % sizeof(iRxMaskKey)]; aBuffer[i] ^= iRxMaskKey[iRxMaskIndex % sizeof(iRxMaskKey)];
} }
} }