diff options
| author | Tomas Bzatek <tbzatek@localhost.localdomain> | 2009-02-08 14:51:22 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@localhost.localdomain> | 2009-02-08 14:51:22 +0100 |
| commit | 07f393e96426dec1592291f68d1796ccbe6c40dd (patch) | |
| tree | 52d257db03551efa561956ea3085b588102d343c /common/strutils.c | |
| parent | eb9c9d72d0dcca73211eb7875bd0f13bb220a98a (diff) | |
| download | tuxcmd-modules-07f393e96426dec1592291f68d1796ccbe6c40dd.tar.xz | |
Fix gcc-4.4.0 compilation
Diffstat (limited to 'common/strutils.c')
| -rw-r--r-- | common/strutils.c | 4 |
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); |
