diff options
Diffstat (limited to 'soltools/mkdepend/main.c')
-rw-r--r-- | soltools/mkdepend/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index 93c971db687b..3641f4fb7fc0 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -717,7 +717,8 @@ void convert_slashes(char *path) char* append_slash(char *path) { char *new_string; - if ((path[strlen(path) - 1] == '/') || (path[strlen(path) - 1] == '\\')) { + const char cLastChar = path[strlen(path) - 1]; + if (cLastChar == '/' || cLastChar == '\\') { new_string = path; } else { new_string = (char*)malloc(sizeof(char) * (strlen(path) + 2)); |