Skip to content

Commit 21f58e4

Browse files
committed
Add return values to functions that need them.
1 parent 96fd892 commit 21f58e4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/SparkFun_LTE_Shield_Arduino_Library.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,8 @@ boolean LTE_Shield::poll(void)
250250
else
251251
{
252252
}
253-
254-
return handled;
255253
}
254+
return handled;
256255
}
257256

258257
void LTE_Shield::setSocketReadCallback(void (*socketReadCallback)(int, String))
@@ -1859,6 +1858,7 @@ LTE_Shield_error_t LTE_Shield::parseSocketListenIndication(IPAddress localIP, IP
18591858
{
18601859
_lastLocalIP = localIP;
18611860
_lastRemoteIP = remoteIP;
1861+
return LTE_SHIELD_ERROR_SUCCESS;
18621862
}
18631863

18641864
LTE_Shield_error_t LTE_Shield::parseSocketCloseIndication(String *closeIndication)
@@ -2017,16 +2017,18 @@ void LTE_Shield::setTimeout(unsigned long timeout)
20172017

20182018
bool LTE_Shield::find(char *target)
20192019
{
2020+
bool found = false;
20202021
if (_hardSerial != NULL)
20212022
{
2022-
_hardSerial->find(target);
2023+
found = _hardSerial->find(target);
20232024
}
20242025
#ifdef LTE_SHIELD_SOFTWARE_SERIAL_ENABLED
20252026
else if (_softSerial != NULL)
20262027
{
2027-
_softSerial->find(target);
2028+
found = _softSerial->find(target);
20282029
}
20292030
#endif
2031+
return found;
20302032
}
20312033

20322034
LTE_Shield_error_t LTE_Shield::autobaud(unsigned long desiredBaud)

0 commit comments

Comments
 (0)