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