llfs
Add const to llfs_get_filename_ext
This commit is contained in:
@@ -86,8 +86,8 @@ size_t llfs_file_count(void);
|
||||
/**
|
||||
* @brief This function returns the extension of a file
|
||||
* @param[in] filename The filename to get the extension from
|
||||
* @return char* The extension of the file
|
||||
* @return const char* The extension of the file
|
||||
*/
|
||||
char* llfs_get_filename_ext(char* filename);
|
||||
const char* llfs_get_filename_ext(const char* filename);
|
||||
|
||||
#endif // LLFS_H
|
||||
|
||||
@@ -141,7 +141,7 @@ size_t llfs_file_count(void) {
|
||||
return file_count;
|
||||
}
|
||||
|
||||
char* llfs_get_filename_ext(char* filename) {
|
||||
const char* llfs_get_filename_ext(const char* filename) {
|
||||
char* dot = strrchr(filename, '.');
|
||||
if (dot == NULL || dot == filename)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user