From 36b803e3582a4f22bf6540fb07e9f57f09ee9127 Mon Sep 17 00:00:00 2001
From: Niklas <niklas.jenner@online.de>
Date: Mon, 22 Jul 2024 08:45:03 +0200
Subject: [PATCH] fix AbortDelay.c Test (#1237)

* fix AbortDelay.c Test

* Uncrustify: triggered by comment.

* Update comment

* Fix formatting

---------

Co-authored-by: Niklas Jenner <niklas.jenner@ifta.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
---
 FreeRTOS/Demo/Common/Minimal/AbortDelay.c | 25 ++++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/FreeRTOS/Demo/Common/Minimal/AbortDelay.c b/FreeRTOS/Demo/Common/Minimal/AbortDelay.c
index 55f0ba638e..581fcbe8ae 100644
--- a/FreeRTOS/Demo/Common/Minimal/AbortDelay.c
+++ b/FreeRTOS/Demo/Common/Minimal/AbortDelay.c
@@ -488,20 +488,21 @@
         uint8_t uxRxData;
 
         #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
-        {
-            /* Defines the memory that will actually hold the streams within the
-             * stream buffer. */
-            static uint8_t ucStorageBuffer[ sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) + 1 ];
 
-            /* The variable used to hold the stream buffer structure. */
+            /* The variable used to hold the stream buffer structure.
+             * This control information is valid as long as xStreamBuffer
+             * is valid. */
             StaticStreamBuffer_t xStreamBufferStruct;
-
-
-            xStreamBuffer = xStreamBufferCreateStatic( sizeof( ucStorageBuffer ),
-                                                       xTriggerLevelBytes,
-                                                       ucStorageBuffer,
-                                                       &xStreamBufferStruct );
-        }
+            {
+                /* Defines the memory that will actually hold the streams within the
+                 * stream buffer. */
+                static uint8_t ucStorageBuffer[ sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) + 1 ];
+
+                xStreamBuffer = xStreamBufferCreateStatic( sizeof( ucStorageBuffer ),
+                                                           xTriggerLevelBytes,
+                                                           ucStorageBuffer,
+                                                           &xStreamBufferStruct );
+            }
         #else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
         {
             xStreamBuffer = xStreamBufferCreate( sizeof( uint8_t ), xTriggerLevelBytes );