diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-04 15:49:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-04 15:56:17 +0100 |
commit | 7fbfc12474b85b31c9d120898fff6e226d76d662 (patch) | |
tree | cb03e0fada25647af8d9ad0f093562828297b555 | |
parent | 9eda6b307ba6c5426c40c4cad95e07e43858230e (diff) |
Still no need for osl_setCommandArgs
(TOCTOU and all)
Change-Id: I81253c8790b631117634bafa4eea65991a975ba0
-rw-r--r-- | desktop/source/lib/init.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 2 | ||||
-rw-r--r-- | sal/osl/w32/process.cxx | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8040f546e9ae..8a7ffd53b065 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -693,11 +693,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath) // again (as an assert will fire), this will be the case e.g. // for unit tests (and possibly if UNO is being used in addition // to LOK in an external program). - if (!osl_areCommandArgsSet()) - { - SAL_INFO("lok", "commandArgs not previously set"); - osl_setCommandArgs(2, pArgs); - } + osl_setCommandArgs(2, pArgs); SAL_INFO("lok", "attempting to initalize UNO"); initialize_uno(aAppURL); SAL_INFO("lok", "uno successfully initalized"); diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 7d8cc81aa655..b5c1fe76fb9c 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -205,7 +205,7 @@ void SAL_CALL osl_setCommandArgs (int argc, char ** argv) { assert(argc > 0); pthread_mutex_lock (&(g_command_args.m_mutex)); - assert (g_command_args.m_nCount == 0); + SAL_WARN_IF(g_command_args.m_nCount != 0, "sal.osl", "args already set"); if (g_command_args.m_nCount == 0) { rtl_uString** ppArgs = (rtl_uString**)rtl_allocateZeroMemory (argc * sizeof(rtl_uString*)); diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx index 49259e03410a..0ab85800704d 100644 --- a/sal/osl/w32/process.cxx +++ b/sal/osl/w32/process.cxx @@ -374,6 +374,7 @@ void SAL_CALL osl_setCommandArgs (int argc, char ** argv) { assert(argc > 0); osl_acquireMutex (*osl_getGlobalMutex()); + SAL_WARN_IF(g_command_args.m_nCount != 0, "sal.osl", "args already set"); if (g_command_args.m_nCount == 0) { rtl_uString** ppArgs = osl_createCommandArgs_Impl (argc, argv); |