[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Thu Jan 22 02:20:17 PST 2015
sal/osl/unx/process_impl.cxx | 4 ++--
sal/osl/unx/system.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit cac3f3e48e31fbb2333f151ece9513c618b27106
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 22 11:19:38 2015 +0100
loplugin:cstylecast (MACOSX)
Change-Id: I9d798beba649a946446893063386a8e521455a48
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index 62f2f78..3dc743a 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -50,9 +50,9 @@ oslProcessError SAL_CALL bootstrap_getExecutableFile(rtl_uString ** ppFileURL)
oslProcessError result = osl_Process_E_NotFound;
char buffer[PATH_MAX];
- size_t buflen = sizeof(buffer);
+ uint32_t buflen = sizeof(buffer);
- if (_NSGetExecutablePath (buffer, (uint32_t*)&buflen) == 0)
+ if (_NSGetExecutablePath (buffer, &buflen) == 0)
{
/* Determine absolute path. */
char abspath[PATH_MAX];
diff --git a/sal/osl/unx/system.cxx b/sal/osl/unx/system.cxx
index 3d0fb6a..cddfd75 100644
--- a/sal/osl/unx/system.cxx
+++ b/sal/osl/unx/system.cxx
@@ -97,7 +97,7 @@ struct hostent *gethostbyname_r(const char *name, struct hostent *result,
result->h_name = buffer;
buffer += nname;
- parray = (char**)buffer;
+ parray = reinterpret_cast<char**>(buffer);
result->h_aliases = parray;
data = buffer + (naliases+1)*sizeof(char*);
for ( p = res->h_aliases; *p != NULL; p++) {
@@ -108,7 +108,7 @@ struct hostent *gethostbyname_r(const char *name, struct hostent *result,
}
*parray = NULL;
buffer = data;
- parray = (char**)buffer;
+ parray = reinterpret_cast<char**>(buffer);
result->h_addr_list = parray;
data = buffer + (naddr_list+1)*sizeof(char*);
for ( p = res->h_addr_list; *p != NULL; p++) {
More information about the Libreoffice-commits
mailing list