From a3bbbff33a0ea30194d4d88063dc533a9385b3a7 Mon Sep 17 00:00:00 2001 From: Stefan Baltruweit Date: Thu, 16 Apr 2026 15:10:12 +0200 Subject: [PATCH] Use stdioERRNO_THREAD_LOCAL_OFFSET macro for ERRNO The previously used ffconfigCWD_THREAD_LOCAL_INDEX has the same value but the stdioERRNO_THREAD_LOCAL_OFFSET macro is more concise. --- include/ff_stdio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ff_stdio.h b/include/ff_stdio.h index a23be6c..9b4c64c 100644 --- a/include/ff_stdio.h +++ b/include/ff_stdio.h @@ -136,14 +136,14 @@ /* Cast from a numeric value to a pointer. */ void * pvValue = ( void * ) ( xErrno ); - vTaskSetThreadLocalStoragePointer( NULL, ffconfigCWD_THREAD_LOCAL_INDEX, pvValue ); + vTaskSetThreadLocalStoragePointer( NULL, stdioERRNO_THREAD_LOCAL_OFFSET, pvValue ); } static portINLINE int stdioGET_ERRNO( void ) { void * pvResult; - pvResult = pvTaskGetThreadLocalStoragePointer( ( TaskHandle_t ) NULL, ffconfigCWD_THREAD_LOCAL_INDEX ); + pvResult = pvTaskGetThreadLocalStoragePointer( ( TaskHandle_t ) NULL, stdioERRNO_THREAD_LOCAL_OFFSET ); /* Cast from a pointer to a number of the same size. */ intptr_t xErrno = ( intptr_t ) pvResult; /* Cast it to an integer. */