[Libreoffice-commits] core.git: soltools/mkdepend
Caolán McNamara
caolanm at redhat.com
Mon Mar 2 03:05:36 PST 2015
soltools/mkdepend/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit aaaa7953f59a7caed35cda14300ddb1654d4efe4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Mar 2 11:04:04 2015 +0000
V804: Decreased performance
Change-Id: I6430442cc407e02810d849cf60833abe7c7d2830
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 93c971d..3641f4f 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));
More information about the Libreoffice-commits
mailing list