[Libreoffice-commits] core.git: sal/osl
Tor Lillqvist
tml at iki.fi
Sun Aug 25 23:04:41 PDT 2013
sal/osl/unx/uunxapi.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 847d60c4525a81c1c299e3b318c0552b2616f49b
Author: Tor Lillqvist <tml at iki.fi>
Date: Mon Aug 26 09:03:17 2013 +0300
Use strncmp()
Change-Id: I593ce24ce83cd3034d23297adc3de5f6de18f3a9
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 866cef2..316f75a 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -272,8 +272,7 @@ int open_c(const char *cpPath, int oflag, int mode)
// scoped bookmark for it so that we can access the file in
// the future, too. (For the "Recent Files" functionality.)
const char *sandbox = [NSHomeDirectory() UTF8String];
- if (!(strlen(cpPath) > strlen(sandbox) &&
- memcmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
+ if (!(strncmp(sandbox, cpPath, strlen(sandbox)) == 0 &&
cpPath[strlen(sandbox)] == '/'))
{
NSURL *url = [NSURL fileURLWithPath:[NSString stringWithUTF8String:cpPath]];
More information about the Libreoffice-commits
mailing list