[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jul 19 09:20:14 UTC 2016
loolwsd/LOOLKit.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 78687a2b18d8de90db662796c16ad7670c2793ac
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jul 19 11:11:58 2016 +0200
LOOLKit: be explicit when testing for non-equality
So that it's obvious that strcmp() is not just a mistyped !strcmp().
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 1c02554..569fb2b 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -94,17 +94,17 @@ namespace
{
case COPY_NO_USR:
// bind mounted.
- return strcmp(path,"usr");
+ return strcmp(path,"usr") != 0;
case COPY_LO:
return
- strcmp(path, "program/wizards") &&
- strcmp(path, "sdk") &&
- strcmp(path, "share/basic") &&
- strcmp(path, "share/gallery") &&
- strcmp(path, "share/Scripts") &&
- strcmp(path, "share/template") &&
- strcmp(path, "share/config/wizard") &&
- strcmp(path, "share/config/wizard");
+ strcmp(path, "program/wizards") != 0 &&
+ strcmp(path, "sdk") != 0 &&
+ strcmp(path, "share/basic") != 0 &&
+ strcmp(path, "share/gallery") != 0 &&
+ strcmp(path, "share/Scripts") != 0 &&
+ strcmp(path, "share/template") != 0 &&
+ strcmp(path, "share/config/wizard") != 0 &&
+ strcmp(path, "share/config/wizard") != 0;
default: // COPY_ALL
return true;
}
@@ -1050,7 +1050,7 @@ void lokit_main(const std::string& childRoot,
char *resolved = realpath(loTemplate.c_str(), NULL);
if (resolved)
{
- if (strcmp(loTemplate.c_str(), resolved))
+ if (strcmp(loTemplate.c_str(), resolved) != 0)
symlinkPathToJail(jailPath, std::string(resolved), loSubPath);
free (resolved);
}
More information about the Libreoffice-commits
mailing list