From 5909fd500a50815cfe180904b907a61428156058 Mon Sep 17 00:00:00 2001 From: Stefan Baltruweit Date: Wed, 24 Apr 2024 14:30:52 +0200 Subject: [PATCH] Add const qualifier to FF_IsNameCompliant() pointer argument The argument is read-only. --- ff_dir.c | 2 +- include/ff_dir.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ff_dir.c b/ff_dir.c index 8ea3c5c..b371325 100644 --- a/ff_dir.c +++ b/ff_dir.c @@ -2886,7 +2886,7 @@ FF_Error_t FF_ExtendDirectory( FF_IOManager_t * pxIOManager, #if ( ffconfigUNICODE_UTF16_SUPPORT != 0 ) BaseType_t FF_IsNameCompliant( FF_T_WCHAR * pcName ) #else - BaseType_t FF_IsNameCompliant( char * pcName ) + BaseType_t FF_IsNameCompliant( const char * pcName ) #endif /* *INDENT-ON* */ { diff --git a/include/ff_dir.h b/include/ff_dir.h index 4a23624..71d5b55 100644 --- a/include/ff_dir.h +++ b/include/ff_dir.h @@ -177,9 +177,9 @@ int8_t FF_PushEntry( FF_IOManager_t * pxIOManager, * contains any legal characters only. */ #if ( ffconfigUNICODE_UTF16_SUPPORT != 0 ) - BaseType_t FF_IsNameCompliant( FF_T_WCHAR * pcName ); + BaseType_t FF_IsNameCompliant( const FF_T_WCHAR * pcName ); #else - BaseType_t FF_IsNameCompliant( char * pcName ); + BaseType_t FF_IsNameCompliant( const char * pcName ); #endif static portINLINE BaseType_t FF_isEndOfDir( const uint8_t * pucEntryBuffer )