summaryrefslogtreecommitdiff
path: root/common/strutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/strutils.c')
-rw-r--r--common/strutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/strutils.c b/common/strutils.c
index ffd95c3..5383b8a 100644
--- a/common/strutils.c
+++ b/common/strutils.c
@@ -74,7 +74,7 @@ char* extract_file_name(const char *APath)
{
if (APath == NULL) return NULL;
// log("xxx = %s\n", (APath + strlen(APath) - 1));
- char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / )
+ const char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / )
if (file_part == NULL) return NULL;
return strdup(file_part + 1);
}
@@ -84,7 +84,7 @@ char* extract_file_path(const char *APath)
{
if (APath == NULL) return NULL;
// log("xxx = %s\n", (APath + strlen(APath) - 1));
- char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / )
+ const char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / )
if (file_part == NULL) return NULL;
char *ANewPath = (char*)malloc(file_part - APath + 2);
snprintf(ANewPath, file_part - APath + 2, "%s", APath);