From aaaa7953f59a7caed35cda14300ddb1654d4efe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 2 Mar 2015 11:04:04 +0000 Subject: [PATCH] V804: Decreased performance Change-Id: I6430442cc407e02810d849cf60833abe7c7d2830 --- soltools/mkdepend/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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));