[Libreoffice-commits] .: desktop/unx sal/rtl

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Sep 14 08:33:26 PDT 2011


 desktop/unx/source/start.c    |    7 +------
 sal/rtl/source/alloc_global.c |   17 ++---------------
 2 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit b7998b6f663eb13ccdfaa7473dd1e9b9288771cd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Sep 14 16:49:54 2011 +0200

    No need to bark about G_SLICE on stderr.

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 3ad641c..e2a3b2a 100755
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -818,7 +818,6 @@ exec_javaldx (Args *args)
     rtl_uString *pApp;
     rtl_uString **ppArgs;
     rtl_uString *pTmp, *pTmp2;
-    rtl_uString *pEnvironment[1] = { NULL };
 
     ppArgs = (rtl_uString **)calloc( args->nArgsEnv + 2, sizeof( rtl_uString* ) );
 
@@ -849,20 +848,16 @@ exec_javaldx (Args *args)
     rtl_uString_newConcat( &pApp, pApp, pTmp );
     rtl_uString_release( pTmp );
 
-    /* unset to avoid bogus console output */
-    rtl_uString_newFromAscii( &pEnvironment[0], "G_SLICE" );
-
     err = osl_executeProcess_WithRedirectedIO( pApp, ppArgs, nArgs,
                                                osl_Process_NORMAL,
                                                NULL, // security
                                                NULL, // work dir
-                                               pEnvironment, 1,
+                                               NULL, 0,
                                                &javaldx, // process handle
                                                NULL,
                                                &fileOut,
                                                NULL);
 
-    rtl_uString_release( pEnvironment[0] );
     rtl_uString_release( ppArgs[nArgs-1] );
     rtl_uString_release( pApp );
     free( ppArgs );
diff --git a/sal/rtl/source/alloc_global.c b/sal/rtl/source/alloc_global.c
index e93c666..57728f6 100644
--- a/sal/rtl/source/alloc_global.c
+++ b/sal/rtl/source/alloc_global.c
@@ -39,21 +39,8 @@ AllocMode alloc_mode = AMode_UNSET;
 #if !defined(FORCE_SYSALLOC)
 static void determine_alloc_mode(void)
 {
-   /* This shouldn't happen, but still ... */
-    if (alloc_mode != AMode_UNSET)
-        return;
-
-    if (getenv("G_SLICE") != NULL)
-    {
-        alloc_mode = AMode_SYSTEM;
-        fprintf(stderr, "LibreOffice: Using system memory allocator.\n");
-        fprintf(stderr, "LibreOffice: This is for debugging only.  To disable,\n");
-        fprintf(stderr, "LibreOffice: unset the environment variable G_SLICE.\n");
-    }
-    else
-    {
-        alloc_mode = AMode_CUSTOM;
-    }
+    OSL_ASSERT(alloc_mode == AMode_UNSET);
+    alloc_mode = (getenv("G_SLICE") == NULL ? AMode_CUSTOM : AMode_SYSTEM);
 }
 
 /* ================================================================= *


More information about the Libreoffice-commits mailing list