diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 11:04:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 11:04:37 +0000 |
commit | aaaa7953f59a7caed35cda14300ddb1654d4efe4 (patch) | |
tree | 1c000c2b22a28c8190367945645bc9b90d1a9d97 /soltools | |
parent | 749c336d305040a374b406327b1c1b303e810983 (diff) |
V804: Decreased performance
Change-Id: I6430442cc407e02810d849cf60833abe7c7d2830
Diffstat (limited to 'soltools')
-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)); |