Skip to content
This repository was archived by the owner on Jan 17, 2024. It is now read-only.

Commit bfde58c

Browse files
committed
getTimeFromSting cosmetic changes
1 parent ec338dd commit bfde58c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/utility/time/TimeService.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,14 @@ unsigned long TimeService::getTimeFromString(const String& input)
214214
static const int expected_length = 20;
215215
static const int expected_parameters = 6;
216216

217-
if(input == nullptr || input.length() != expected_length)
218-
{
217+
if(input == nullptr || input.length() != expected_length) {
219218
DEBUG_ERROR("ArduinoIoTCloudTCP::%s invalid input length", __FUNCTION__);
220219
return 0;
221220
}
222221

223222
int scanned_parameters = sscanf(input.c_str(), "%d %s %d %d:%d:%d", &year, s_month, &day, &hour, &min, &sec);
224223

225-
if(scanned_parameters != expected_parameters)
226-
{
224+
if(scanned_parameters != expected_parameters) {
227225
DEBUG_ERROR("ArduinoIoTCloudTCP::%s invalid input parameters number", __FUNCTION__);
228226
return 0;
229227
}

0 commit comments

Comments
 (0)