Skip to content

Commit ff1517b

Browse files
authored
Merge pull request #467 from dalprahcd/add-missing-early-return-example
added: missing early return at thread_network example
2 parents 928ba0b + d74aaaf commit ff1517b

File tree

1 file changed

+1
-0
lines changed
  • examples/tutorials/thread_network/02_sensor_final

1 file changed

+1
-0
lines changed

examples/tutorials/thread_network/02_sensor_final/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ static void sensor_ipc_callback(int pid, int len, int buf,
1919
if (len < ((int) sizeof(current_temperature))) {
2020
// We do not inform the caller and simply return. We do print a log message:
2121
puts("[thread-sensor] ERROR: sensor IPC invoked with too small buffer.\r\n");
22+
return;
2223
}
2324

2425
// The buffer is large enough, copy the current temperature into it:

0 commit comments

Comments
 (0)