Skip to content

Commit b0b9553

Browse files
committed
CellularStack: remove unnecessary assignment.
Fixes Coverity issue about unused variable.
1 parent 7c13b8f commit b0b9553

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

features/cellular/framework/targets/RiotMicro/AT/RM1000_AT_CellularStack.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,9 @@ nsapi_size_or_error_t RM1000_AT_CellularStack::socket_recvfrom_impl(CellularSock
281281
} else {
282282
if (count == 0) {
283283
// Timeout with nothing received
284-
nsapi_error_size = NSAPI_ERROR_WOULD_BLOCK;
285284
success = false;
286285
}
287-
size = 0; // This simply to cause an exit
286+
break;
288287
}
289288
}
290289
timer.stop();

features/cellular/framework/targets/UBLOX/AT/UBLOX_AT_CellularStack.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,9 @@ nsapi_size_or_error_t UBLOX_AT_CellularStack::socket_recvfrom_impl(CellularSocke
302302
} else {
303303
if (count == 0) {
304304
// Timeout with nothing received
305-
nsapi_error_size = NSAPI_ERROR_WOULD_BLOCK;
306305
success = false;
307306
}
308-
size = 0; // This simply to cause an exit
307+
break;
309308
}
310309
}
311310
} else if (socket->proto == NSAPI_TCP) {
@@ -346,10 +345,9 @@ nsapi_size_or_error_t UBLOX_AT_CellularStack::socket_recvfrom_impl(CellularSocke
346345
} else {
347346
if (count == 0) {
348347
// Timeout with nothing received
349-
nsapi_error_size = NSAPI_ERROR_WOULD_BLOCK;
350348
success = false;
351349
}
352-
size = 0; // This simply to cause an exit
350+
break;
353351
}
354352
}
355353
}

0 commit comments

Comments
 (0)