From d74aaaf8e2d5a985cc4b37881ae6757d7eb06520 Mon Sep 17 00:00:00 2001 From: "Hudson C. Dalpra" Date: Mon, 30 Sep 2024 21:21:39 +1300 Subject: [PATCH] added: missing early return at thread_network example --- examples/tutorials/thread_network/02_sensor_final/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tutorials/thread_network/02_sensor_final/main.c b/examples/tutorials/thread_network/02_sensor_final/main.c index 3a92056a7..374489d16 100644 --- a/examples/tutorials/thread_network/02_sensor_final/main.c +++ b/examples/tutorials/thread_network/02_sensor_final/main.c @@ -19,6 +19,7 @@ static void sensor_ipc_callback(int pid, int len, int buf, if (len < ((int) sizeof(current_temperature))) { // We do not inform the caller and simply return. We do print a log message: puts("[thread-sensor] ERROR: sensor IPC invoked with too small buffer.\r\n"); + return; } // The buffer is large enough, copy the current temperature into it: