diff options
| -rw-r--r-- | common/strutils.c | 4 | ||||
| -rw-r--r-- | common/treepathutils.c | 2 |
2 files changed, 3 insertions, 3 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); diff --git a/common/treepathutils.c b/common/treepathutils.c index 2e43f94..c8f2b18 100644 --- a/common/treepathutils.c +++ b/common/treepathutils.c @@ -191,7 +191,7 @@ unsigned long int filelist_find_index_by_path(struct PathTree *tree, const char void filelist_tree_add_item_recurr(struct PathTree *tree, const char *path, const char *original_pathstr, struct TVFSItem *item, unsigned long index) { - char *pos = strstr(path, "/"); + const char *pos = strstr(path, "/"); char *first_part; char *last_part; if (pos) { |
