Author: pfg
Date: Sun Apr 10 02:30:31 2016
New Revision: 1738404

URL: http://svn.apache.org/viewvc?rev=1738404&view=rev
Log:
Replace 0 with NULL for pointers.

Only applied to C code: common style for C++ is different.

Found with coccinelle:  http://coccinelle.lip6.fr/

Modified:
    openoffice/trunk/main/desktop/source/pagein/file_image_unx.c
    openoffice/trunk/main/desktop/source/pagein/pagein.c
    openoffice/trunk/main/rsc/source/rscpp/cpp3.c
    openoffice/trunk/main/rsc/source/rscpp/cpp4.c
    openoffice/trunk/main/sal/osl/os2/diagnose.c
    openoffice/trunk/main/sal/osl/os2/module.c
    openoffice/trunk/main/sal/osl/os2/nlsupport.c
    openoffice/trunk/main/sal/osl/os2/process.c
    openoffice/trunk/main/sal/osl/os2/profile.c
    openoffice/trunk/main/sal/osl/os2/socket.c
    openoffice/trunk/main/sal/osl/os2/tempfile.c
    openoffice/trunk/main/sal/osl/os2/thread.c
    openoffice/trunk/main/sal/osl/unx/backtrace.c
    openoffice/trunk/main/sal/osl/unx/conditn.c
    openoffice/trunk/main/sal/osl/unx/diagnose.c
    openoffice/trunk/main/sal/osl/unx/module.c
    openoffice/trunk/main/sal/osl/unx/mutex.c
    openoffice/trunk/main/sal/osl/unx/nlsupport.c
    openoffice/trunk/main/sal/osl/unx/pipe.c
    openoffice/trunk/main/sal/osl/unx/process.c
    openoffice/trunk/main/sal/osl/unx/profile.c
    openoffice/trunk/main/sal/osl/unx/security.c
    openoffice/trunk/main/sal/osl/unx/signal.c
    openoffice/trunk/main/sal/osl/unx/socket.c
    openoffice/trunk/main/sal/osl/unx/system.c
    openoffice/trunk/main/sal/osl/unx/tempfile.c
    openoffice/trunk/main/sal/osl/unx/thread.c
    openoffice/trunk/main/sal/osl/unx/util.c
    openoffice/trunk/main/sal/osl/w32/dllentry.c
    openoffice/trunk/main/sal/osl/w32/security.c
    openoffice/trunk/main/sal/osl/w32/thread.c
    openoffice/trunk/main/sal/osl/w32/time.c
    openoffice/trunk/main/sal/rtl/source/alloc_arena.c
    openoffice/trunk/main/sal/rtl/source/alloc_cache.c
    openoffice/trunk/main/sal/rtl/source/alloc_global.c
    openoffice/trunk/main/sal/rtl/source/byteseq.c
    openoffice/trunk/main/sal/rtl/source/locale.c
    openoffice/trunk/main/sal/rtl/source/rtl_process.c
    openoffice/trunk/main/sal/rtl/source/tres.c
    openoffice/trunk/main/sal/workben/t_readline.c
    openoffice/trunk/main/soltools/cpp/_getopt.c
    openoffice/trunk/main/soltools/cpp/_mcrvalid.c
    openoffice/trunk/main/soltools/cpp/_nlist.c

Modified: openoffice/trunk/main/desktop/source/pagein/file_image_unx.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/pagein/file_image_unx.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/pagein/file_image_unx.c (original)
+++ openoffice/trunk/main/desktop/source/pagein/file_image_unx.c Sun Apr 10 
02:30:31 2016
@@ -49,7 +49,7 @@ int file_image_open (file_image * image,
     struct stat st;
     void *      p;
 
-    if (image == 0)
+    if (image == NULL)
         return (EINVAL);
 
     image->m_base = MAP_FAILED, image->m_size = 0;
@@ -87,10 +87,10 @@ int file_image_pagein (file_image * imag
        size_t        k;
        volatile char c = 0;
 
-       if (image == 0)
+       if (image == NULL)
                return (EINVAL);
 
-       if ((w.m_base = image->m_base) == 0)
+       if ((w.m_base = image->m_base) == NULL)
                return (EINVAL);
        if ((w.m_size = image->m_size) == 0)
                return (0);
@@ -135,12 +135,12 @@ int file_image_pagein (file_image * imag
  */
 int file_image_close (file_image * image)
 {
-    if (image == 0)
+    if (image == NULL)
         return (EINVAL);
 
     if (munmap (image->m_base, image->m_size) == -1)
                return (errno);
 
-       image->m_base = 0, image->m_size = 0;
+       image->m_base = NULL, image->m_size = 0;
     return (0);
 }

Modified: openoffice/trunk/main/desktop/source/pagein/pagein.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/pagein/pagein.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/pagein/pagein.c (original)
+++ openoffice/trunk/main/desktop/source/pagein/pagein.c Sun Apr 10 02:30:31 
2016
@@ -70,7 +70,7 @@ int  main (int argc, char **argv)
 
        for (i = 1; i < argc; i++)
        {
-               FILE   * fp = 0;
+               FILE   * fp = NULL;
                size_t   k  = 0;
 
                if (argv[i][0] == '-')
@@ -99,10 +99,10 @@ int  main (int argc, char **argv)
                }
                
 
-               if ((argv[i][0] == '@') && ((fp = fopen (argv[i], "r")) == 0))
+               if ((argv[i][0] == '@') && ((fp = fopen (argv[i], "r")) == 
NULL))
                {
                        char path[1024];
-                       if ((fp = fopen (&(argv[i][1]), "r")) == 0)
+                       if ((fp = fopen (&(argv[i][1]), "r")) == NULL)
                        {
                                fprintf (stderr, "fopen: %s\n", 
strerror(errno));
                                continue;
@@ -124,7 +124,7 @@ int  main (int argc, char **argv)
                }
                else
                {
-                       if (fp != 0)
+                       if (fp != NULL)
                                fclose (fp);
 
                        if (do_pagein (argv[i], &k) == 0)

Modified: openoffice/trunk/main/rsc/source/rscpp/cpp3.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/source/rscpp/cpp3.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/rsc/source/rscpp/cpp3.c (original)
+++ openoffice/trunk/main/rsc/source/rscpp/cpp3.c Sun Apr 10 02:30:31 2016
@@ -411,7 +411,7 @@ readoptions(char* filename, char*** pfar
                         pfa[fargc+1]=malloc(strlen(optbuff)+1);
                         strcpy(pfa[fargc+1],optbuff);
                         fargc++;
-                        pfa[fargc+1]=0;
+                        pfa[fargc+1]=NULL;
                         poptbuff=&optbuff[0];
                     }
                 }

Modified: openoffice/trunk/main/rsc/source/rscpp/cpp4.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/rsc/source/rscpp/cpp4.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/rsc/source/rscpp/cpp4.c (original)
+++ openoffice/trunk/main/rsc/source/rscpp/cpp4.c Sun Apr 10 02:30:31 2016
@@ -88,7 +88,7 @@ void dodefine()
         register int            c;
         register DEFBUF         *dp;            /* -> new definition    */
         int                     isredefine;     /* TRUE if redefined    */
-        char                    *old = 0;       /* Remember redefined   */
+        char                    *old = NULL;       /* Remember redefined   */
 
         if (type[(c = skipws())] != LET)
             goto bad_define;

Modified: openoffice/trunk/main/sal/osl/os2/diagnose.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/diagnose.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/diagnose.c (original)
+++ openoffice/trunk/main/sal/osl/os2/diagnose.c Sun Apr 10 02:30:31 2016
@@ -113,7 +113,7 @@ sal_Bool SAL_CALL osl_assertFailedLine(
     /* format message into buffer */
     sprintf(szMessage, "Assertion Failed: %s: File %s, Line %d:\n",
             lpszAppName, pszFileName, nLine);
-    if(pszMessage != 0)
+    if(pszMessage != NULL)
         strcat( szMessage, pszMessage );
 
     szMessage[sizeof(szMessage)-1] = '\0';

Modified: openoffice/trunk/main/sal/osl/os2/module.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/module.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/module.c (original)
+++ openoffice/trunk/main/sal/osl/os2/module.c Sun Apr 10 02:30:31 2016
@@ -221,12 +221,12 @@ osl_getAsciiFunctionSymbol( oslModule Mo
 {
     PFN  pFunction;
     APIRET rc;
-    void* pHandle=0;
+    void* pHandle=NULL;
 
     OSL_ENSURE(Module,"osl_getSymbol : module handle is not valid");
     OSL_ENSURE(Module,"osl_getSymbol : ustrSymbolName");
 
-    if ( Module!= 0 && pSymbol != 0 )
+    if ( Module!= 0 && pSymbol != NULL )
     {
 
                rc = DosQueryProcAddr( (HMODULE) Module, 0, (PCSZ)pSymbol, 
&pFunction );

Modified: openoffice/trunk/main/sal/osl/os2/nlsupport.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/nlsupport.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/nlsupport.c (original)
+++ openoffice/trunk/main/sal/osl/os2/nlsupport.c Sun Apr 10 02:30:31 2016
@@ -321,7 +321,7 @@ const _pair _iso_language_list[] = {
 
 rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 {
-    const _pair *language = 0;
+    const _pair *language = NULL;
     char locale_buf[64] = "";
     char *cp;
 

Modified: openoffice/trunk/main/sal/osl/os2/process.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/process.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/process.c (original)
+++ openoffice/trunk/main/sal/osl/os2/process.c Sun Apr 10 02:30:31 2016
@@ -133,9 +133,9 @@ oslProcessError SAL_CALL osl_executeProc
 {
 
     oslProcessError Error;
-    sal_Char* pszWorkDir=0;
-    sal_Char** pArguments=0;
-    sal_Char** pEnvironment=0;
+    sal_Char* pszWorkDir=NULL;
+    sal_Char** pArguments=NULL;
+    sal_Char** pEnvironment=NULL;
     unsigned int index;
     
     char szImagePath[PATH_MAX] = "";
@@ -168,13 +168,13 @@ oslProcessError SAL_CALL osl_executeProc
         FileURLToPath( szImagePath, PATH_MAX, ustrImageName );
     }
 
-    if ( ustrWorkDir != 0 && ustrWorkDir->length )
+    if ( ustrWorkDir != NULL && ustrWorkDir->length )
     {
         FileURLToPath( szWorkDir, PATH_MAX, ustrWorkDir );
         pszWorkDir = szWorkDir;
     }
 
-    if ( pArguments == 0 && nArguments > 0 )
+    if ( pArguments == NULL && nArguments > 0 )
     {
         pArguments = (sal_Char**) malloc( ( nArguments + 2 ) * 
sizeof(sal_Char*) );
     }
@@ -182,7 +182,7 @@ oslProcessError SAL_CALL osl_executeProc
 
     for ( index = 0 ; index < nArguments ; ++index )
     {
-        rtl_String* strArg =0;
+        rtl_String* strArg =NULL;
 
 
         rtl_uString2String( &strArg,
@@ -193,14 +193,14 @@ oslProcessError SAL_CALL osl_executeProc
 
         pArguments[index]=strdup(rtl_string_getStr(strArg));
         rtl_string_release(strArg);
-               pArguments[index+1]=0;
+               pArguments[index+1]=NULL;
     }
 
     for ( index = 0 ; index < nEnvironmentVars ; ++index )
     {
-        rtl_String* strEnv=0;
+        rtl_String* strEnv=NULL;
 
-        if ( pEnvironment == 0 )
+        if ( pEnvironment == NULL )
         {
             pEnvironment = (sal_Char**) malloc( ( nEnvironmentVars + 2 ) * 
sizeof(sal_Char*) );
         }
@@ -213,7 +213,7 @@ oslProcessError SAL_CALL osl_executeProc
 
         pEnvironment[index]=strdup(rtl_string_getStr(strEnv));
         rtl_string_release(strEnv);
-        pEnvironment[index+1]=0;
+        pEnvironment[index+1]=NULL;
     }
 
        int             rc, pid;
@@ -279,11 +279,11 @@ oslProcessError SAL_CALL osl_executeProc
        dup2( saveError, STDERR_FILENO);
        close( saveError);
 
-    if ( pArguments != 0 )
+    if ( pArguments != NULL )
     {
         for ( index = 0 ; index < nArguments ; ++index )
         {
-            if ( pArguments[index] != 0 )
+            if ( pArguments[index] != NULL )
             {
                 free(pArguments[index]);
             }
@@ -291,11 +291,11 @@ oslProcessError SAL_CALL osl_executeProc
         free(pArguments);
     }
 
-    if ( pEnvironment != 0 )
+    if ( pEnvironment != NULL )
     {
         for ( index = 0 ; index < nEnvironmentVars ; ++index )
         {
-            if ( pEnvironment[index] != 0 )
+            if ( pEnvironment[index] != NULL )
             {
                 free(pEnvironment[index]);
             }

Modified: openoffice/trunk/main/sal/osl/os2/profile.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/profile.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/profile.c (original)
+++ openoffice/trunk/main/sal/osl/os2/profile.c Sun Apr 10 02:30:31 2016
@@ -290,7 +290,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
     OSL_TRACE("In  osl_closeProfile\n");
 #endif
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_closeProfile [profile==0]\n");
@@ -302,7 +302,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
        {
         pProfile = acquireProfile(Profile,sal_True);
 
-        if ( pProfile != 0 )
+        if ( pProfile != NULL )
         {
                        if ( !( pProfile->m_Flags & osl_Profile_READLOCK )  && 
( pProfile->m_Flags & FLG_MODIFIED ) )
                        {
@@ -317,7 +317,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
                        pProfile = acquireProfile(Profile,sal_False);
                }
 
-               if ( pProfile == 0 )
+               if ( pProfile == NULL )
                {
 #ifdef TRACE_OSL_PROFILE
                        OSL_TRACE("Out osl_closeProfile [pProfile==0]\n");
@@ -337,23 +337,23 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
        if ( pProfile->m_NoLines > 0)
        {
                unsigned int index=0;
-               if ( pProfile->m_Lines != 0 )
+               if ( pProfile->m_Lines != NULL )
                {
                        for ( index = 0 ; index < pProfile->m_NoLines ; ++index)
                        {
-                               if ( pProfile->m_Lines[index] != 0 )
+                               if ( pProfile->m_Lines[index] != NULL )
                                {
                                        free(pProfile->m_Lines[index]);
                                }
                        }
                        free(pProfile->m_Lines);
                }
-               if ( pProfile->m_Sections != 0 )
+               if ( pProfile->m_Sections != NULL )
                {
                        /*osl_TProfileSection* pSections=pProfile->m_Sections;*/
                        for ( index = 0 ; index < pProfile->m_NoSections ; 
++index )
                        {
-                               if ( pProfile->m_Sections[index].m_Entries != 0 
)
+                               if ( pProfile->m_Sections[index].m_Entries != 
NULL )
                                {
                                        
free(pProfile->m_Sections[index].m_Entries);
                                }
@@ -380,7 +380,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslPr
     OSL_TRACE("In  osl_flushProfile()\n");
 #endif
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_flushProfile() [pProfile == 0]\n");
@@ -389,7 +389,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslPr
     }
 
        pFile = pProfile->m_pFile;
-    if ( !( pFile != 0 && pFile->m_Handle >= 0 ) )
+    if ( !( pFile != NULL && pFile->m_Handle >= 0 ) )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_flushProfile() [invalid file]\n");
@@ -417,9 +417,9 @@ sal_Bool SAL_CALL osl_readProfileString(
                                         const sal_Char* pszDefault)
 {
        sal_uInt32    NoEntry;
-       const sal_Char* pStr = 0;
+       const sal_Char* pStr = NULL;
        osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
 
 
 #ifdef TRACE_OSL_PROFILE
@@ -449,7 +449,7 @@ sal_Bool SAL_CALL osl_readProfileString(
                else
                        pStr = pszDefault;
 
-               if ( pStr != 0 )
+               if ( pStr != NULL )
                {
                        pStr = stripBlanks(pStr, NULL);
                        MaxLen = (MaxLen - 1 < strlen(pStr)) ? (MaxLen - 1) : 
strlen(pStr);
@@ -465,7 +465,7 @@ sal_Bool SAL_CALL osl_readProfileString(
 
        releaseProfile(pProfile);
 
-       if ( pStr == 0 )
+       if ( pStr == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_readProfileString [pStr==0]\n");
@@ -557,7 +557,7 @@ sal_Bool SAL_CALL osl_writeProfileString
        const sal_Char* pStr;
        sal_Char        Line[4096];
        osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
 
 #ifdef TRACE_OSL_PROFILE
     OSL_TRACE("In  osl_writeProfileString\n");
@@ -700,7 +700,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry
 {
        sal_uInt32    NoEntry;
        osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
     sal_Bool bRet = sal_False;
 
 #ifdef TRACE_OSL_PROFILE
@@ -758,7 +758,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectio
        sal_uInt32    i, n = 0;
        sal_uInt32    NoEntry;
        osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
 
 #ifdef TRACE_OSL_PROFILE
     OSL_TRACE("In  osl_getProfileSectionEntries\n");
@@ -1151,8 +1151,8 @@ static osl_TFile* openFileImpl(rtl_uStri
         ULONG flags;
         ULONG mode;
        sal_Bool bWriteable = sal_False;
-       rtl_String* strFileName=0;
-       sal_Char* pszFileName=0;
+       rtl_String* strFileName=NULL;
+       sal_Char* pszFileName=NULL;
 
     /* check parameters */
     OSL_ASSERT( ustrFileName );
@@ -1206,7 +1206,7 @@ static osl_TFile* openFileImpl(rtl_uStri
 
        rtl_string_release(strFileName);
                
-       pFile->m_pWriteBuf=0;
+       pFile->m_pWriteBuf=NULL;
        pFile->m_nWriteBufFree=0;
        pFile->m_nWriteBufLen=0;
 
@@ -1231,7 +1231,7 @@ static osl_TStamp closeFileImpl(osl_TFil
 {
        osl_TStamp stamp = {0, 0};
 
-    if ( pFile == 0 )
+    if ( pFile == NULL )
     {
         return stamp;
     }
@@ -1256,7 +1256,7 @@ static osl_TStamp closeFileImpl(osl_TFil
                DosClose(pFile->m_Handle);
        }
 
-       if ( pFile->m_pWriteBuf != 0 )
+       if ( pFile->m_pWriteBuf != NULL )
        {
                free(pFile->m_pWriteBuf);
        }
@@ -1383,12 +1383,12 @@ static sal_Bool putLine(osl_TFile* pFile
        int strLen=0;
 #endif
 
-       if ( pFile == 0 || pFile->m_Handle < 0 )
+       if ( pFile == NULL || pFile->m_Handle < 0 )
     {
                return (sal_False);
     }
 
-    if ( pFile->m_pWriteBuf == 0 )
+    if ( pFile->m_pWriteBuf == NULL )
     {
         pFile->m_pWriteBuf = (sal_Char*) malloc(Len+3);
         pFile->m_nWriteBufLen = Len+3;
@@ -1401,7 +1401,7 @@ static sal_Bool putLine(osl_TFile* pFile
             sal_Char* pTmp;
 
             pTmp=(sal_Char*) realloc(pFile->m_pWriteBuf,( ( 
pFile->m_nWriteBufLen + Len ) * 2) );
-            if ( pTmp == 0 )
+            if ( pTmp == NULL )
             {
                 return sal_False;
             }
@@ -1567,7 +1567,7 @@ static void removeLine(osl_TProfileImpl*
                }
                else
                {
-                       pProfile->m_Lines[LineNo] = 0;
+                       pProfile->m_Lines[LineNo] = NULL;
                }
 
                pProfile->m_NoLines--;
@@ -1694,7 +1694,7 @@ static void removeSection(osl_TProfileIm
                }
                else
                {
-                       pSection->m_Entries = 0;
+                       pSection->m_Entries = NULL;
                }
 
                pProfile->m_NoSections--;
@@ -1921,7 +1921,7 @@ static osl_TProfileImpl* acquireProfile(
                        sal_Bool bWriteable = sal_False;
                        char pszFilename[PATH_MAX] = "";
                
-                       if ( pProfile->m_strFileName != 0  && 
pProfile->m_strFileName->buffer[0] != 0 )
+                       if ( pProfile->m_strFileName != NULL  && 
pProfile->m_strFileName->buffer[0] != 0 )
                                FileURLToPath( pszFilename, PATH_MAX, 
pProfile->m_strFileName );
                    /* hack: usually you have a specific HAB, but NULL works 
here... */
                pProfile->m_hIni = PrfOpenProfile(NULL, (PCSZ)pszFilename);
@@ -1939,7 +1939,7 @@ static sal_Bool releaseProfile(osl_TProf
     OSL_TRACE("In  releaseProfile\n");
 #endif
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out releaseProfile [profile==0]\n");

Modified: openoffice/trunk/main/sal/osl/os2/socket.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/socket.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/socket.c (original)
+++ openoffice/trunk/main/sal/osl/os2/socket.c Sun Apr 10 02:30:31 2016
@@ -693,11 +693,11 @@ oslSocketAddr SAL_CALL osl_createInetSoc
        rtl_uString *ustrDottedAddr,
        sal_Int32    Port)
 {
-    rtl_String* strDottedAddr=0;
+    rtl_String* strDottedAddr=NULL;
     oslSocketAddr Addr;
-    sal_Char* pszDottedAddr=0;
+    sal_Char* pszDottedAddr=NULL;
 
-    if ( ustrDottedAddr != 0 )
+    if ( ustrDottedAddr != NULL )
     {
         rtl_uString2String( &strDottedAddr,
                             rtl_uString_getStr(ustrDottedAddr),
@@ -710,7 +710,7 @@ oslSocketAddr SAL_CALL osl_createInetSoc
 
     Addr = osl_psz_createInetSocketAddr(pszDottedAddr, Port);
 
-    if ( strDottedAddr != 0 )
+    if ( strDottedAddr != NULL )
     {
         rtl_string_release(strDottedAddr);
     }
@@ -1168,10 +1168,10 @@ oslHostAddr SAL_CALL osl_createHostAddr
        const oslSocketAddr Addr)
 {
     oslHostAddr HostAddr;
-    rtl_String* strHostname=0;
-    sal_Char* pszHostName=0;
+    rtl_String* strHostname=NULL;
+    sal_Char* pszHostName=NULL;
 
-    if ( ustrHostname != 0 )
+    if ( ustrHostname != NULL )
     {
         rtl_uString2String( &strHostname,
                             rtl_uString_getStr(ustrHostname),
@@ -1183,7 +1183,7 @@ oslHostAddr SAL_CALL osl_createHostAddr
 
     HostAddr = osl_psz_createHostAddr(pszHostName,Addr);
 
-    if ( strHostname != 0 )
+    if ( strHostname != NULL )
     {
         rtl_string_release(strHostname);
     }
@@ -1230,10 +1230,10 @@ oslHostAddr SAL_CALL osl_psz_createHostA
 oslHostAddr SAL_CALL osl_createHostAddrByName(rtl_uString *ustrHostname)
 {
     oslHostAddr HostAddr;
-    rtl_String* strHostname=0;
-    sal_Char* pszHostName=0;
+    rtl_String* strHostname=NULL;
+    sal_Char* pszHostName=NULL;
 
-    if ( ustrHostname != 0 )
+    if ( ustrHostname != NULL )
     {
         rtl_uString2String( &strHostname,
                             rtl_uString_getStr(ustrHostname),
@@ -1245,7 +1245,7 @@ oslHostAddr SAL_CALL osl_createHostAddrB
 
     HostAddr = osl_psz_createHostAddrByName(pszHostName);
 
-    if ( strHostname != 0 )
+    if ( strHostname != NULL )
     {
         rtl_string_release(strHostname);
     }
@@ -1320,7 +1320,7 @@ void SAL_CALL osl_getHostnameOfHostAddr
        const oslHostAddr   Addr,
        rtl_uString       **ustrHostname)
 {
-    const sal_Char* pHostname=0;
+    const sal_Char* pHostname=NULL;
 
     pHostname = osl_psz_getHostnameOfHostAddr(Addr);
 
@@ -1480,10 +1480,10 @@ oslSocketResult SAL_CALL osl_psz_getLoca
 oslSocketAddr SAL_CALL osl_resolveHostname(rtl_uString *ustrHostname)
 {
     oslSocketAddr Addr;
-    rtl_String* strHostname=0;
-    sal_Char* pszHostName=0;
+    rtl_String* strHostname=NULL;
+    sal_Char* pszHostName=NULL;
 
-    if ( ustrHostname != 0 )
+    if ( ustrHostname != NULL )
     {
         rtl_uString2String( &strHostname,
                             rtl_uString_getStr(ustrHostname),
@@ -1496,7 +1496,7 @@ oslSocketAddr SAL_CALL osl_resolveHostna
 
     Addr = osl_psz_resolveHostname(pszHostName);
 
-    if ( strHostname != 0 )
+    if ( strHostname != NULL )
     {
         rtl_string_release(strHostname);
     }
@@ -1528,12 +1528,12 @@ oslSocketAddr SAL_CALL osl_psz_resolveHo
 sal_Int32 SAL_CALL osl_getServicePort(rtl_uString *ustrServicename, 
rtl_uString *ustrProtocol)
 {
     sal_Int32 nPort;
-    rtl_String* strServicename=0;
-    rtl_String* strProtocol=0;
-    sal_Char* pszServiceName=0;
-    sal_Char* pszProtocol=0;
+    rtl_String* strServicename=NULL;
+    rtl_String* strProtocol=NULL;
+    sal_Char* pszServiceName=NULL;
+    sal_Char* pszProtocol=NULL;
 
-    if ( ustrServicename != 0 )
+    if ( ustrServicename != NULL )
     {
         rtl_uString2String( &strServicename,
                             rtl_uString_getStr(ustrServicename),
@@ -1543,7 +1543,7 @@ sal_Int32 SAL_CALL osl_getServicePort(rt
         pszServiceName = rtl_string_getStr(strServicename);
     }
 
-    if ( ustrProtocol != 0 )
+    if ( ustrProtocol != NULL )
     {
         rtl_uString2String( &strProtocol,
                             rtl_uString_getStr(ustrProtocol),
@@ -1555,12 +1555,12 @@ sal_Int32 SAL_CALL osl_getServicePort(rt
 
     nPort = osl_psz_getServicePort(pszServiceName,pszProtocol);
 
-    if ( strServicename != 0 )
+    if ( strServicename != NULL )
     {
         rtl_string_release(strServicename);
     }
 
-    if ( strProtocol != 0 )
+    if ( strProtocol != NULL )
     {
         rtl_string_release(strProtocol);
     }
@@ -1577,7 +1577,7 @@ sal_Int32 SAL_CALL osl_psz_getServicePor
 
        ps= getservbyname(pszServicename, pszProtocol);
 
-       if (ps != 0)
+       if (ps != NULL)
                return ntohs(ps->s_port);
 
        return OSL_INVALID_PORT;
@@ -2350,7 +2350,7 @@ sal_Int32 SAL_CALL osl_receiveFromSocket
                                                      oslSocketMsgFlag Flag)
 {
     int nRead;
-       struct sockaddr *pSystemSockAddr = 0;
+       struct sockaddr *pSystemSockAddr = NULL;
        int AddrLen = 0;
        if( pSenderAddr )
        {
@@ -2440,7 +2440,7 @@ sal_Int32 SAL_CALL osl_sendToSocket(oslS
 {
     int nWritten;
 
-       struct sockaddr *pSystemSockAddr = 0;
+       struct sockaddr *pSystemSockAddr = NULL;
        int AddrLen = 0;
        if( ReceiverAddr )
        {

Modified: openoffice/trunk/main/sal/osl/os2/tempfile.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/tempfile.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/tempfile.c (original)
+++ openoffice/trunk/main/sal/osl/os2/tempfile.c Sun Apr 10 02:30:31 2016
@@ -127,8 +127,8 @@ static oslFileError osl_setup_base_direc
        rtl_uString*  pustrDirectoryURL,
        rtl_uString** ppustr_base_dir)
 {
-       rtl_uString* dir_url = 0;
-       rtl_uString* dir     = 0;
+       rtl_uString* dir_url = NULL;
+       rtl_uString* dir     = NULL;
     oslFileError error   = osl_File_E_None;                     
     
        if (pustrDirectoryURL)
@@ -165,9 +165,10 @@ static oslFileError osl_setup_base_direc
  {
        oslFileError osl_error;
        
-       OSL_PRECOND(((0 != pHandle) || (0 != ppustrTempFileURL)), "Invalid 
parameter!");
+       OSL_PRECOND(((NULL != pHandle) || (NULL != ppustrTempFileURL)),
+                   "Invalid parameter!");
        
-       if ((0 == pHandle) && (0 == ppustrTempFileURL))
+       if ((NULL == pHandle) && (NULL == ppustrTempFileURL))
        {
                osl_error = osl_File_E_INVAL;
        }
@@ -176,7 +177,7 @@ static oslFileError osl_setup_base_direc
                osl_error = osl_setup_base_directory_impl_(
                        pustrDirectoryURL, ppustr_base_dir);
                        
-               *b_delete_on_close = (0 == ppustrTempFileURL);
+               *b_delete_on_close = (NULL == ppustrTempFileURL);
        }
        
        return osl_error;
@@ -192,10 +193,10 @@ static oslFileError osl_create_temp_file
        oslFileHandle* file_handle,
        rtl_uString** ppustr_temp_file_name)
 {
-       rtl_uString*        rand_name        = 0;
+       rtl_uString*        rand_name        = NULL;
        sal_uInt32          len_base_dir     = 0;
-       rtl_uString*        tmp_file_path    = 0;
-       rtl_uString*        tmp_file_url     = 0;
+       rtl_uString*        tmp_file_path    = NULL;
+       rtl_uString*        tmp_file_url     = NULL;
        sal_Int32           capacity         = 0;
        oslFileError        osl_error        = osl_File_E_None;
        sal_Int32           offset_file_name;
@@ -296,8 +297,8 @@ oslFileError SAL_CALL osl_createTempFile
        oslFileHandle* pHandle, 
        rtl_uString**  ppustrTempFileURL)
 {
-       rtl_uString*  base_directory     = 0;   
-       rtl_uString*  temp_file_name     = 0;
+       rtl_uString*  base_directory     = NULL;        
+       rtl_uString*  temp_file_name     = NULL;
        oslFileHandle temp_file_handle;
        sal_Bool      b_delete_on_close;
        oslFileError  osl_error;
@@ -317,7 +318,7 @@ oslFileError SAL_CALL osl_createTempFile
                                                                
        if (osl_File_E_None == osl_error) 
        {               
-               rtl_uString* temp_file_url = 0;         
+               rtl_uString* temp_file_url = NULL;              
                
                /* assuming this works */
                osl_getFileURLFromSystemPath(temp_file_name, &temp_file_url);

Modified: openoffice/trunk/main/sal/osl/os2/thread.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/os2/thread.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/os2/thread.c (original)
+++ openoffice/trunk/main/sal/osl/os2/thread.c Sun Apr 10 02:30:31 2016
@@ -377,7 +377,7 @@ oslThreadPriority  SAL_CALL osl_getThrea
     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
     /* invalid arguments ?*/
-    if(pThreadImpl==0 || pThreadImpl->m_ThreadId==-1)
+    if(pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1)
     {
         return osl_Thread_PriorityUnknown;
     }
@@ -451,7 +451,7 @@ sal_Bool SAL_CALL osl_isThreadRunning(co
     APIRET rc;
 
     /* invalid arguments ?*/
-    if(pThreadImpl==0 || pThreadImpl->m_ThreadId==-1)
+    if(pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1)
     {
         return sal_False;
     }
@@ -472,7 +472,7 @@ void SAL_CALL osl_joinWithThread(oslThre
     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
     /* invalid arguments?*/
-    if(pThreadImpl==0 || pThreadImpl->m_ThreadId==-1)
+    if(pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1)
     {
         /* assume thread is not running */
         return;
@@ -503,7 +503,7 @@ void SAL_CALL osl_terminateThread(oslThr
     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
     /* invalid arguments?*/
-    if (pThreadImpl==0 || pThreadImpl->m_ThreadId==-1)
+    if (pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1)
     {
         /* assume thread is not running */
         return;
@@ -525,7 +525,7 @@ sal_Bool SAL_CALL osl_scheduleThread(osl
     osl_yieldThread();
 
     /* invalid arguments?*/
-    if (pThreadImpl==0 || pThreadImpl->m_ThreadId==-1)
+    if (pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1)
     {
         /* assume thread is not running */
         return sal_False;
@@ -577,7 +577,7 @@ static void AddKeyToList( PTLS pTls )
                DosRequestMutexSem( MutexLock, SEM_INDEFINITE_WAIT );
 
                pTls->pNext = g_pThreadKeyList;
-               pTls->pPrev = 0;
+               pTls->pPrev = NULL;
                
                if ( g_pThreadKeyList )
                        g_pThreadKeyList->pPrev = pTls;
@@ -641,7 +641,7 @@ oslThreadKey SAL_CALL osl_createThreadKe
                if (DosAllocThreadLocalMemory(1, &pTls->pulPtr) != NO_ERROR)
                {
                        rtl_freeMemory( pTls );
-                       pTls = 0;
+                       pTls = NULL;
                }
                else 
                {

Modified: openoffice/trunk/main/sal/osl/unx/backtrace.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/backtrace.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/backtrace.c (original)
+++ openoffice/trunk/main/sal/osl/unx/backtrace.c Sun Apr 10 02:30:31 2016
@@ -78,11 +78,11 @@ int backtrace( void **buffer, int max_fr
        fpval = ((long*)(ctx))[FRAME_PTR_OFFSET];
        fp = (struct frame*)((char*)(fpval) + STACK_BIAS);
 
-       for (i = 0; (i < FRAME_OFFSET) && (fp != 0); i++)
+       for (i = 0; (i < FRAME_OFFSET) && (fp != NULL); i++)
                fp = (struct frame*)((char*)(fp->fr_savfp) + STACK_BIAS);
 
        /* iterate through backtrace */
-       for (i = 0; (fp != 0) && (fp->fr_savpc != 0) && (i < max_frames); i++)
+       for (i = 0; (fp != NULL) && (fp->fr_savpc != 0) && (i < max_frames); 
i++)
        {
                /* saved (prev) frame */
                struct frame * prev = (struct frame*)((char*)(fp->fr_savfp) + 
STACK_BIAS);
@@ -154,7 +154,7 @@ int backtrace( void **buffer, int max_fr
        /* get stack- and framepointer */
        setjmp(ctx);
        fp = (struct frame*)(((size_t*)(ctx))[FRAME_PTR_OFFSET]);
-       for ( i=0; (i<FRAME_OFFSET) && (fp!=0); i++)
+       for ( i=0; (i<FRAME_OFFSET) && (fp!=NULL); i++)
                fp = fp->fr_savfp;
        /* iterate through backtrace */
        for (i=0; fp && fp->fr_savpc && i<max_frames; i++)
@@ -238,7 +238,7 @@ int backtrace( void **buffer, int max_fr
        /* get stack- and framepointer */
        setjmp(ctx);
        fp = (struct frame*)(((size_t*)(ctx))[FRAME_PTR_OFFSET]);
-       for ( i=0; (i<FRAME_OFFSET) && (fp!=0); i++)
+       for ( i=0; (i<FRAME_OFFSET) && (fp!=NULL); i++)
                fp = fp->fr_savfp;
 
        /* iterate through backtrace */

Modified: openoffice/trunk/main/sal/osl/unx/conditn.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/conditn.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/conditn.c (original)
+++ openoffice/trunk/main/sal/osl/unx/conditn.c Sun Apr 10 02:30:31 2016
@@ -50,7 +50,7 @@ oslCondition SAL_CALL osl_createConditio
 
        OSL_ASSERT(pCond);
 
-       if ( pCond == 0 )
+       if ( pCond == NULL )
        {
                return 0;
        }
@@ -82,7 +82,7 @@ oslCondition SAL_CALL osl_createConditio
         }
 
         free(pCond);
-           pCond = 0;
+           pCond = NULL;
        }
 
        return (oslCondition)pCond;
@@ -130,7 +130,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCo
    OSL_ASSERT(Condition);
    pCond = (oslConditionImpl*)Condition;
 
-   if ( pCond == 0 )
+   if ( pCond == NULL )
    {
           return sal_False;
    }
@@ -177,7 +177,7 @@ sal_Bool SAL_CALL osl_resetCondition(osl
 
        pCond = (oslConditionImpl*)Condition;
 
-       if ( pCond == 0 )
+       if ( pCond == NULL )
        {
                return sal_False;
        }
@@ -215,7 +215,7 @@ oslConditionResult SAL_CALL osl_waitCond
        OSL_ASSERT(Condition);
        pCond = (oslConditionImpl*)Condition;
 
-       if ( pCond == 0 )
+       if ( pCond == NULL )
        {
                return osl_cond_result_error; 
        }
@@ -320,7 +320,7 @@ sal_Bool SAL_CALL osl_checkCondition(osl
        OSL_ASSERT(Condition);
        pCond = (oslConditionImpl*)Condition;
 
-       if ( pCond == 0 )
+       if ( pCond == NULL )
        {
                return sal_False;
        }

Modified: openoffice/trunk/main/sal/osl/unx/diagnose.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/diagnose.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/diagnose.c (original)
+++ openoffice/trunk/main/sal/osl/unx/diagnose.c Sun Apr 10 02:30:31 2016
@@ -82,8 +82,8 @@ static void osl_diagnose_frame_Impl (
        int                 depth,
        void *              pc)
 {
-       const char *fname = 0, *sname = 0;
-       void       *fbase = 0, *saddr = 0;
+       const char *fname = NULL, *sname = NULL;
+       void       *fbase = NULL, *saddr = NULL;
        ptrdiff_t   offset;
        char        szMessage[1024];
 
@@ -183,10 +183,10 @@ static void osl_diagnose_backtrace_Impl
        fpval = ((long*)(ctx))[FRAME_PTR_OFFSET];
        fp = (struct frame*)((char*)(fpval) + STACK_BIAS);
 
-       for (i = 0; (i < FRAME_OFFSET) && (fp != 0); i++)
+       for (i = 0; (i < FRAME_OFFSET) && (fp != NULL); i++)
                fp = (struct frame*)((char*)(fp->fr_savfp) + STACK_BIAS);
 
-       for (i = 0; (fp != 0) && (fp->fr_savpc != 0); i++)
+       for (i = 0; (fp != NULL) && (fp->fr_savpc != 0); i++)
        {
                struct frame * prev = (struct frame*)((char*)(fp->fr_savfp) + 
STACK_BIAS);
                osl_diagnose_frame_Impl (f, i, (void*)(fp->fr_savpc));
@@ -215,10 +215,10 @@ static void osl_diagnose_backtrace_Impl
        setjmp (ctx);
        fp = (struct frame*)(((long*)(ctx))[FRAME_PTR_OFFSET]);
 
-       for (i = 0; (i < FRAME_OFFSET) && (fp != 0); i++)
+       for (i = 0; (i < FRAME_OFFSET) && (fp != NULL); i++)
                fp = fp->fr_savfp;
 
-       for (i = 0; (fp != 0) && (fp->fr_savpc != 0); i++)
+       for (i = 0; (fp != NULL) && (fp->fr_savpc != 0); i++)
        {
                struct frame * prev = fp->fr_savfp;
                osl_diagnose_frame_Impl (f, i, (void*)(fp->fr_savpc));
@@ -263,7 +263,7 @@ sal_Bool SAL_CALL osl_assertFailedLine (
         return doAbort;
 
        /* format message into buffer */
-       if (pszMessage != 0)
+       if (pszMessage != NULL)
        {
                snprintf(szMessage, sizeof(szMessage),
                                 "Error: File %s, Line %" SAL_PRIdINT32 ": 
%s\n",

Modified: openoffice/trunk/main/sal/osl/unx/module.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/module.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/module.c (original)
+++ openoffice/trunk/main/sal/osl/unx/module.c Sun Apr 10 02:30:31 2016
@@ -82,7 +82,7 @@ oslModule SAL_CALL osl_loadAsciiModule(c
                void* pLib = dlopen(pszModuleName, rtld_mode);
 
 #if OSL_DEBUG_LEVEL > 1
-               if (pLib == 0)
+               if (pLib == NULL)
                        OSL_TRACE("error: osl_loadModule failed with %s\n", 
dlerror());
 #endif /* OSL_DEBUG_LEVEL */
 

Modified: openoffice/trunk/main/sal/osl/unx/mutex.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/mutex.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/mutex.c (original)
+++ openoffice/trunk/main/sal/osl/unx/mutex.c Sun Apr 10 02:30:31 2016
@@ -59,7 +59,7 @@ oslMutex SAL_CALL osl_createMutex()
     
        OSL_ASSERT(pMutex);
 
-       if ( pMutex == 0 )
+       if ( pMutex == NULL )
        {
                return 0;
        }
@@ -75,7 +75,7 @@ oslMutex SAL_CALL osl_createMutex()
                   nRet, strerror(nRet));
         
            free(pMutex);
-               pMutex = 0;
+               pMutex = NULL;
        }
 
     pthread_mutexattr_destroy(&aMutexAttr);
@@ -92,7 +92,7 @@ void SAL_CALL osl_destroyMutex(oslMutex
 
     OSL_ASSERT(pMutex);
     
-       if ( pMutex != 0 )
+       if ( pMutex != NULL )
        {
         int nRet=0;
         
@@ -118,7 +118,7 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMu
     
     OSL_ASSERT(pMutex);
 
-       if ( pMutex != 0 )
+       if ( pMutex != NULL )
        {
         int nRet=0;
         

Modified: openoffice/trunk/main/sal/osl/unx/nlsupport.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/nlsupport.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/nlsupport.c (original)
+++ openoffice/trunk/main/sal/osl/unx/nlsupport.c Sun Apr 10 02:30:31 2016
@@ -541,13 +541,13 @@ static pthread_mutex_t aLocalMutex = PTH
 
 rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 {
-    const _pair *language=0;
+    const _pair *language=NULL;
     
     char  locale_buf[64] = "";
     char  codeset_buf[64];
 
-    char *ctype_locale = 0;
-    char *codeset      = 0;
+    char *ctype_locale = NULL;
+    char *codeset      = NULL;
 
     /* default to process locale if pLocale == NULL */
     if( NULL == pLocale )
@@ -765,7 +765,7 @@ const _pair _iso_language_list[] = {
 
 rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 {
-    const _pair *language = 0;
+    const _pair *language = NULL;
     char locale_buf[64] = "";
     char *cp;
 

Modified: openoffice/trunk/main/sal/osl/unx/pipe.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/pipe.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/pipe.c (original)
+++ openoffice/trunk/main/sal/osl/unx/pipe.c Sun Apr 10 02:30:31 2016
@@ -135,10 +135,10 @@ void __osl_destroyPipeImpl(oslPipe pImpl
 oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions 
Options, oslSecurity Security)
 {
     oslPipe pPipe=0;
-    rtl_String* strPipeName=0;
-    sal_Char* pszPipeName=0;
+    rtl_String* strPipeName=NULL;
+    sal_Char* pszPipeName=NULL;
 
-    if ( ustrPipeName != 0 )
+    if ( ustrPipeName != NULL )
     {
         rtl_uString2String( &strPipeName,
                             rtl_uString_getStr(ustrPipeName),
@@ -148,7 +148,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uStr
         pszPipeName = rtl_string_getStr(strPipeName);
         pPipe = osl_psz_createPipe(pszPipeName, Options, Security);
 
-        if ( strPipeName != 0 )
+        if ( strPipeName != NULL )
         {
             rtl_string_release(strPipeName);
         }

Modified: openoffice/trunk/main/sal/osl/unx/process.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/process.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/process.c (original)
+++ openoffice/trunk/main/sal/osl/unx/process.c Sun Apr 10 02:30:31 2016
@@ -155,7 +155,7 @@ oslProcessError SAL_CALL osl_searchPath_
     
        OSL_ASSERT(pszName != NULL);
 
-       if ( pszName == 0 )
+       if ( pszName == NULL )
        {
                return osl_Process_E_NotFound;
        }
@@ -167,7 +167,7 @@ oslProcessError SAL_CALL osl_searchPath_
                Separator = ':';
 
 
-       if ( (pchr = getenv(pszPath)) != 0 )
+       if ( (pchr = getenv(pszPath)) != NULL )
        {
                sal_Char *pstr;
 
@@ -693,9 +693,9 @@ oslProcessError SAL_CALL osl_executeProc
 {
 
     oslProcessError Error;
-    sal_Char* pszWorkDir=0;
-    sal_Char** pArguments=0;
-    sal_Char** pEnvironment=0;
+    sal_Char* pszWorkDir=NULL;
+    sal_Char** pArguments=NULL;
+    sal_Char** pEnvironment=NULL;
     unsigned int idx;
     
     char szImagePath[PATH_MAX] = "";
@@ -706,13 +706,13 @@ oslProcessError SAL_CALL osl_executeProc
         FileURLToPath( szImagePath, PATH_MAX, ustrImageName );
     }
 
-    if ( ustrWorkDir != 0 && ustrWorkDir->length )
+    if ( ustrWorkDir != NULL && ustrWorkDir->length )
     {
         FileURLToPath( szWorkDir, PATH_MAX, ustrWorkDir );
         pszWorkDir = szWorkDir;
     }
 
-    if ( pArguments == 0 && nArguments > 0 )
+    if ( pArguments == NULL && nArguments > 0 )
     {
         pArguments = (sal_Char**) malloc( ( nArguments + 2 ) * 
sizeof(sal_Char*) );
     }
@@ -720,7 +720,7 @@ oslProcessError SAL_CALL osl_executeProc
 
     for ( idx = 0 ; idx < nArguments ; ++idx )
     {
-        rtl_String* strArg =0;
+        rtl_String* strArg =NULL;
 
 
         rtl_uString2String( &strArg,
@@ -731,14 +731,14 @@ oslProcessError SAL_CALL osl_executeProc
 
         pArguments[idx]=strdup(rtl_string_getStr(strArg));
         rtl_string_release(strArg);
-               pArguments[idx+1]=0;
+               pArguments[idx+1]=NULL;
     }
 
     for ( idx = 0 ; idx < nEnvironmentVars ; ++idx )
     {
-        rtl_String* strEnv=0;
+        rtl_String* strEnv=NULL;
 
-        if ( pEnvironment == 0 )
+        if ( pEnvironment == NULL )
         {
             pEnvironment = (sal_Char**) malloc( ( nEnvironmentVars + 2 ) * 
sizeof(sal_Char*) );
         }
@@ -751,7 +751,7 @@ oslProcessError SAL_CALL osl_executeProc
 
         pEnvironment[idx]=strdup(rtl_string_getStr(strEnv));
         rtl_string_release(strEnv);
-        pEnvironment[idx+1]=0;
+        pEnvironment[idx+1]=NULL;
     }
 
 
@@ -767,11 +767,11 @@ oslProcessError SAL_CALL osl_executeProc
                                                                   pErrorRead
                                                                   );
 
-    if ( pArguments != 0 )
+    if ( pArguments != NULL )
     {
         for ( idx = 0 ; idx < nArguments ; ++idx )
         {
-            if ( pArguments[idx] != 0 )
+            if ( pArguments[idx] != NULL )
             {
                 free(pArguments[idx]);
             }
@@ -779,11 +779,11 @@ oslProcessError SAL_CALL osl_executeProc
         free(pArguments);
     }
 
-    if ( pEnvironment != 0 )
+    if ( pEnvironment != NULL )
     {
         for ( idx = 0 ; idx < nEnvironmentVars ; ++idx )
         {
-            if ( pEnvironment[idx] != 0 )
+            if ( pEnvironment[idx] != NULL )
             {
                 free(pEnvironment[idx]);
             }
@@ -859,7 +859,7 @@ oslProcessError SAL_CALL osl_psz_execute
 
        OSL_ASSERT(pszImageName != NULL);
 
-       if ( pszImageName == 0 )
+       if ( pszImageName == NULL )
        {
                return osl_Process_E_NotFound;
        }
@@ -869,7 +869,7 @@ oslProcessError SAL_CALL osl_psz_execute
                pszImageName = path;
 
        Data.m_pszArgs[0] = strdup(pszImageName);
-       Data.m_pszArgs[1] = 0;
+       Data.m_pszArgs[1] = NULL;
 
     if ( pszArguments != 0 )
     {
@@ -920,7 +920,7 @@ oslProcessError SAL_CALL osl_psz_execute
     for (i = 0; Data.m_pszEnv[i] != NULL; i++)
                  free((void *)Data.m_pszEnv[i]);
 
-    if ( Data.m_pszDir != 0 )
+    if ( Data.m_pszDir != NULL )
     {
                free((void *)Data.m_pszDir);
     }
@@ -1159,7 +1159,7 @@ sal_Bool osl_getProcStat(pid_t pid, stru
 
        if ((fd = open(name,O_RDONLY)) >=0 )
        {
-               char* tmp=0;
+               char* tmp=NULL;
                char prstatbuf[512];
                memset(prstatbuf,0,512);
                bRet = read(fd,prstatbuf,511) == 511;
@@ -1213,7 +1213,7 @@ sal_Bool osl_getProcStatus(pid_t pid, st
 
        if ((fd = open(name,O_RDONLY)) >=0 )
        {
-               char* tmp=0;
+               char* tmp=NULL;
                char prstatusbuf[512];
                memset(prstatusbuf,0,512);
                bRet = read(fd,prstatusbuf,511) == 511;

Modified: openoffice/trunk/main/sal/osl/unx/profile.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/profile.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/profile.c (original)
+++ openoffice/trunk/main/sal/osl/unx/profile.c Sun Apr 10 02:30:31 2016
@@ -181,7 +181,7 @@ oslProfile SAL_CALL osl_openProfile(rtl_
 {
     char profilePath[PATH_MAX] = "";
 
-    if ( ustrProfileName != 0  && ustrProfileName->buffer[0] != 0 )
+    if ( ustrProfileName != NULL  && ustrProfileName->buffer[0] != 0 )
         FileURLToPath( profilePath, PATH_MAX, ustrProfileName );
 
     return osl_psz_openProfile( profilePath,Options );
@@ -239,7 +239,7 @@ static oslProfile SAL_CALL osl_psz_openP
 
        pProfile = calloc(1, sizeof(osl_TProfileImpl));
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
         return 0;
     }
@@ -303,7 +303,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
        {
         pProfile = acquireProfile(Profile,sal_True);
 
-        if ( pProfile != 0 )
+        if ( pProfile != NULL )
         {
                        bRet=storeProfile(pProfile, sal_True);
             OSL_ASSERT(bRet);
@@ -315,7 +315,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
        }
 
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
                pthread_mutex_unlock(&(pProfile->m_AccessLock));
 #ifdef TRACE_OSL_PROFILE
@@ -334,32 +334,32 @@ sal_Bool SAL_CALL osl_closeProfile(oslPr
        if ( pProfile->m_NoLines > 0)
        {
                unsigned int idx=0;
-               if ( pProfile->m_Lines != 0 )
+               if ( pProfile->m_Lines != NULL )
                {
                        for ( idx = 0 ; idx < pProfile->m_NoLines ; ++idx)
                        {
-                               if ( pProfile->m_Lines[idx] != 0 )
+                               if ( pProfile->m_Lines[idx] != NULL )
                                {
                                        free(pProfile->m_Lines[idx]);
-                    pProfile->m_Lines[idx]=0;
+                    pProfile->m_Lines[idx]=NULL;
                                }
                        }
                        free(pProfile->m_Lines);
-            pProfile->m_Lines=0;
+            pProfile->m_Lines=NULL;
                }
-               if ( pProfile->m_Sections != 0 )
+               if ( pProfile->m_Sections != NULL )
                {
                        /*osl_TProfileSection* pSections=pProfile->m_Sections;*/
                        for ( idx = 0 ; idx < pProfile->m_NoSections ; ++idx )
                        {
-                               if ( pProfile->m_Sections[idx].m_Entries != 0 )
+                               if ( pProfile->m_Sections[idx].m_Entries != 
NULL )
                                {
                                        
free(pProfile->m_Sections[idx].m_Entries);
-                    pProfile->m_Sections[idx].m_Entries=0;
+                    pProfile->m_Sections[idx].m_Entries=NULL;
                                }
                        }
                        free(pProfile->m_Sections);
-            pProfile->m_Sections=0;
+            pProfile->m_Sections=NULL;
                }
        }
 
@@ -386,7 +386,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslPr
     OSL_TRACE("In  osl_flushProfile()\n");
 #endif
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_flushProfile() [pProfile == 0]\n");
@@ -407,7 +407,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslPr
     }
 
        pFile = pProfile->m_pFile;
-    if ( !( pFile != 0 && pFile->m_Handle >= 0 ) )
+    if ( !( pFile != NULL && pFile->m_Handle >= 0 ) )
     {
         pthread_mutex_unlock(&(pProfile->m_AccessLock));
 #ifdef TRACE_OSL_PROFILE
@@ -443,7 +443,7 @@ static sal_Bool writeProfileImpl(osl_TFi
     OSL_TRACE("In  osl_writeProfileImpl()\n");
 #endif
 
-    if ( !( pFile != 0 && pFile->m_Handle >= 0 ) || ( pFile->m_pWriteBuf == 0 
) )
+    if ( !( pFile != NULL && pFile->m_Handle >= 0 ) || ( pFile->m_pWriteBuf == 
NULL ) )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_writeProfileImpl() [invalid args]\n");
@@ -470,7 +470,7 @@ static sal_Bool writeProfileImpl(osl_TFi
 #endif
 
     free(pFile->m_pWriteBuf);
-    pFile->m_pWriteBuf=0;
+    pFile->m_pWriteBuf=NULL;
        pFile->m_nWriteBufLen=0;
        pFile->m_nWriteBufFree=0;
 #ifdef TRACE_OSL_PROFILE
@@ -486,10 +486,10 @@ sal_Bool SAL_CALL osl_readProfileString(
                               const sal_Char* pszDefault)
 {
     sal_uInt32    NoEntry;
-    sal_Char* pStr=0;
+    sal_Char* pStr=NULL;
     osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile=0;
-       osl_TProfileImpl*    pTmpProfile=0;
+       osl_TProfileImpl*    pProfile=NULL;
+       osl_TProfileImpl*    pTmpProfile=NULL;
     sal_Bool bRet = sal_False;
 
 #ifdef TRACE_OSL_PROFILE
@@ -498,7 +498,7 @@ sal_Bool SAL_CALL osl_readProfileString(
 
     pTmpProfile = (osl_TProfileImpl*) Profile;
 
-    if ( pTmpProfile == 0 )
+    if ( pTmpProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_readProfileString [pTmpProfile==0]\n");
@@ -541,7 +541,7 @@ sal_Bool SAL_CALL osl_readProfileString(
             pStr=(sal_Char*)pszDefault;
         }
 
-        if ( pStr != 0 )
+        if ( pStr != NULL )
         {
             pStr = stripBlanks(pStr, NULL);
             MaxLen = (MaxLen - 1 < strlen(pStr)) ? (MaxLen - 1) : strlen(pStr);
@@ -557,7 +557,7 @@ sal_Bool SAL_CALL osl_readProfileString(
     bRet=releaseProfile(pProfile);
     OSL_ASSERT(bRet);
 
-       if ( pStr == 0 )
+       if ( pStr == NULL )
     {
         pthread_mutex_unlock(&(pTmpProfile->m_AccessLock));
 #ifdef TRACE_OSL_PROFILE
@@ -649,10 +649,10 @@ sal_Bool SAL_CALL osl_writeProfileString
     sal_Bool bRet = sal_False;
     sal_uInt32    NoEntry;
     sal_Char* pStr;
-       sal_Char*               Line = 0;
+       sal_Char*               Line = NULL;
     osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
-       osl_TProfileImpl*    pTmpProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
+       osl_TProfileImpl*    pTmpProfile = NULL;
 
 #ifdef TRACE_OSL_PROFILE
     OSL_TRACE("In  osl_writeProfileString\n");
@@ -660,7 +660,7 @@ sal_Bool SAL_CALL osl_writeProfileString
 
     pTmpProfile = (osl_TProfileImpl*) Profile;
 
-    if ( pTmpProfile == 0 )
+    if ( pTmpProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_writeProfileString [pTmpProfile==0]\n");
@@ -772,7 +772,7 @@ sal_Bool SAL_CALL osl_writeProfileString
     OSL_ASSERT(bRet);
 
     pthread_mutex_unlock(&(pTmpProfile->m_AccessLock));
-    if ( Line!= 0 )
+    if ( Line!= NULL )
     {
         free(Line);
     }
@@ -839,8 +839,8 @@ sal_Bool SAL_CALL osl_removeProfileEntry
 {
     sal_uInt32    NoEntry;
     osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
-       osl_TProfileImpl*    pTmpProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
+       osl_TProfileImpl*    pTmpProfile = NULL;
     sal_Bool bRet = sal_False;
 
 #ifdef TRACE_OSL_PROFILE
@@ -849,7 +849,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry
 
     pTmpProfile = (osl_TProfileImpl*) Profile;
 
-    if ( pTmpProfile == 0 )
+    if ( pTmpProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_removeProfileEntry [pProfile==0]\n");
@@ -925,8 +925,8 @@ sal_uInt32 SAL_CALL osl_getProfileSectio
     sal_uInt32    i, n = 0;
     sal_uInt32    NoEntry;
     osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
-       osl_TProfileImpl*    pTmpProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
+       osl_TProfileImpl*    pTmpProfile = NULL;
     sal_Bool bRet = sal_False;
 
 #ifdef TRACE_OSL_PROFILE
@@ -935,7 +935,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectio
 
     pTmpProfile = (osl_TProfileImpl*) Profile;
 
-    if ( pTmpProfile == 0 )
+    if ( pTmpProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_getProfileSectionEntries [pTmpProfile==0]\n");
@@ -1026,8 +1026,8 @@ sal_uInt32 SAL_CALL osl_getProfileSectio
 {
        sal_uInt32    i, n = 0;
        osl_TProfileSection* pSec;
-       osl_TProfileImpl*    pProfile = 0;
-       osl_TProfileImpl*    pTmpProfile = 0;
+       osl_TProfileImpl*    pProfile = NULL;
+       osl_TProfileImpl*    pTmpProfile = NULL;
     sal_Bool bRet = sal_False;
 
 #ifdef TRACE_OSL_PROFILE
@@ -1036,7 +1036,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectio
 
     pTmpProfile = (osl_TProfileImpl*) Profile;
 
-    if ( pTmpProfile == 0 )
+    if ( pTmpProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out osl_getProfileSections [pTmpProfile==0]\n");
@@ -1146,7 +1146,7 @@ static sal_Bool OslProfile_lockFile(cons
         sal_Char* pEnvValue;
         pEnvValue = getenv( "STAR_PROFILE_LOCKING_DISABLED" );
 
-        if ( pEnvValue == 0 )
+        if ( pEnvValue == NULL )
         {
             bLockingDisabled = sal_False;
 
@@ -1263,7 +1263,7 @@ static osl_TFile* openFileImpl(const sal
                fcntl(pFile->m_Handle, F_SETFD, Flags);
        }
 
-    pFile->m_pWriteBuf=0;
+    pFile->m_pWriteBuf=NULL;
     pFile->m_nWriteBufFree=0;
     pFile->m_nWriteBufLen=0;
 
@@ -1289,7 +1289,7 @@ static osl_TStamp closeFileImpl(osl_TFil
     OSL_TRACE("In  closeFileImpl\n");
 #endif
 
-    if ( pFile == 0 )
+    if ( pFile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out closeFileImpl [pFile == 0]\n");
@@ -1365,7 +1365,7 @@ static sal_Char* OslProfile_getLine(osl_
        sal_Char* pLine = NULL;
        sal_Char* pNewLine;
 
-       if ( pFile == 0 )
+       if ( pFile == NULL )
        {
                return 0;
        }
@@ -1454,12 +1454,12 @@ static sal_Bool OslProfile_putLine(osl_T
        int strLen=0;
 #endif
 
-       if ( pFile == 0 || pFile->m_Handle < 0 )
+       if ( pFile == NULL || pFile->m_Handle < 0 )
     {
                return (sal_False);
     }
 
-    if ( pFile->m_pWriteBuf == 0 )
+    if ( pFile->m_pWriteBuf == NULL )
     {
         pFile->m_pWriteBuf = malloc(Len+3);
         pFile->m_nWriteBufLen = Len+3;
@@ -1472,7 +1472,7 @@ static sal_Bool OslProfile_putLine(osl_T
             sal_Char* pTmp;
 
             pTmp= realloc(pFile->m_pWriteBuf,( ( pFile->m_nWriteBufLen + Len ) 
* 2) );
-            if ( pTmp == 0 )
+            if ( pTmp == NULL )
             {
                 return sal_False;
             }
@@ -1538,7 +1538,7 @@ static sal_Char* addLine(osl_TProfileImp
                                                                 
pProfile->m_MaxLines * sizeof(sal_Char *));
                        for ( idx = oldmax ; idx < pProfile->m_MaxLines ; ++idx 
)
                        {
-                               pProfile->m_Lines[idx]=0;
+                               pProfile->m_Lines[idx]=NULL;
                        }
         }
 
@@ -1551,7 +1551,7 @@ static sal_Char* addLine(osl_TProfileImp
 
     }
 
-       if ( pProfile->m_Lines != 0 && pProfile->m_Lines[pProfile->m_NoLines] 
!= 0 )
+       if ( pProfile->m_Lines != NULL && 
pProfile->m_Lines[pProfile->m_NoLines] != NULL )
        {
         free(pProfile->m_Lines[pProfile->m_NoLines]);
        }
@@ -1625,7 +1625,7 @@ static void removeLine(osl_TProfileImpl*
     if (LineNo < pProfile->m_NoLines)
     {
         free(pProfile->m_Lines[LineNo]);
-        pProfile->m_Lines[LineNo]=0;
+        pProfile->m_Lines[LineNo]=NULL;
         if (pProfile->m_NoLines - LineNo > 1)
                {
                        sal_uInt32 i, n;
@@ -1653,7 +1653,7 @@ static void removeLine(osl_TProfileImpl*
                }
                else
                {
-                       pProfile->m_Lines[LineNo] = 0;
+                       pProfile->m_Lines[LineNo] = NULL;
                }
 
         pProfile->m_NoLines--;
@@ -1753,7 +1753,7 @@ static sal_Bool addSection(osl_TProfileI
                                           pProfile->m_MaxSections * 
sizeof(osl_TProfileSection));
                        for ( idx = oldmax ; idx < pProfile->m_MaxSections ; 
++idx )
                        {
-                               pProfile->m_Sections[idx].m_Entries=0;
+                               pProfile->m_Sections[idx].m_Entries=NULL;
                        }
         }
 
@@ -1767,7 +1767,7 @@ static sal_Bool addSection(osl_TProfileI
 
     pProfile->m_NoSections++;
 
-       if ( pProfile->m_Sections[(pProfile->m_NoSections) - 1].m_Entries != 0 )
+       if ( pProfile->m_Sections[(pProfile->m_NoSections) - 1].m_Entries != 
NULL )
        {
                free(pProfile->m_Sections[(pProfile->m_NoSections) - 
1].m_Entries);
     }
@@ -1789,7 +1789,7 @@ static void removeSection(osl_TProfileIm
     if ((Section = pSection - pProfile->m_Sections) < pProfile->m_NoSections)
     {
         free (pSection->m_Entries);
-               pSection->m_Entries=0;
+               pSection->m_Entries=NULL;
         if (pProfile->m_NoSections - Section > 1)
         {
             memmove(&pProfile->m_Sections[Section], 
&pProfile->m_Sections[Section + 1],
@@ -1798,11 +1798,11 @@ static void removeSection(osl_TProfileIm
             memset(&pProfile->m_Sections[pProfile->m_NoSections - 1],
                    0,
                    (pProfile->m_MaxSections - pProfile->m_NoSections) * 
sizeof(osl_TProfileSection));
-                       pProfile->m_Sections[pProfile->m_NoSections - 
1].m_Entries = 0;
+                       pProfile->m_Sections[pProfile->m_NoSections - 
1].m_Entries = NULL;
         }
                else
                {
-                       pSection->m_Entries = 0;
+                       pSection->m_Entries = NULL;
                }
 
         pProfile->m_NoSections--;
@@ -1818,7 +1818,7 @@ static  sal_uInt32    Sect = 0;
         sal_uInt32    i, n;
         sal_uInt32     Len;
         const sal_Char*        pStr;
-        osl_TProfileSection* pSec=0;
+        osl_TProfileSection* pSec=NULL;
 
     Len = strlen(Section);
 
@@ -1874,19 +1874,19 @@ static sal_Bool loadProfile(osl_TFile* p
     pProfile->m_NoLines    = 0;
     pProfile->m_NoSections = 0;
 
-       if ( pFile == 0 )
+       if ( pFile == NULL )
        {
                return sal_False;
        }
 
-       if ( pProfile == 0 )
+       if ( pProfile == NULL )
        {
                return sal_False;
        }
 
        OSL_VERIFY(OslProfile_rewindFile(pFile, sal_False));
 
-    while ( ( pLine=OslProfile_getLine(pFile) ) != 0 )
+    while ( ( pLine=OslProfile_getLine(pFile) ) != NULL )
     {
                bWasAdded = addLine( pProfile, pLine );
                rtl_freeMemory( pLine );
@@ -1951,7 +1951,7 @@ static sal_Bool storeProfile(osl_TProfil
 
                        osl_TFile* pTmpFile = osl_openTmpProfileImpl(pProfile);
 
-                       if ( pTmpFile == 0 )
+                       if ( pTmpFile == NULL )
                        {
                                return sal_False;
                        }
@@ -1965,12 +1965,12 @@ static sal_Bool storeProfile(osl_TProfil
 
                        if ( ! writeProfileImpl(pTmpFile) )
             {
-                               if ( pTmpFile->m_pWriteBuf != 0 )
+                               if ( pTmpFile->m_pWriteBuf != NULL )
                                {
                                        free(pTmpFile->m_pWriteBuf);
                                }
 
-                               pTmpFile->m_pWriteBuf=0;
+                               pTmpFile->m_pWriteBuf=NULL;
                                pTmpFile->m_nWriteBufLen=0;
                                pTmpFile->m_nWriteBufFree=0;
 
@@ -2022,7 +2022,7 @@ static sal_Bool storeProfile(osl_TProfil
 
 static osl_TFile* osl_openTmpProfileImpl(osl_TProfileImpl* pProfile)
 {
-       osl_TFile* pFile=0;
+       osl_TFile* pFile=NULL;
        sal_Char* pszExtension = "tmp";
        sal_Char pszTmpName[PATH_MAX];
        oslProfileOption PFlags=0;
@@ -2173,7 +2173,7 @@ static sal_Bool releaseProfile(osl_TProf
     OSL_TRACE("In  releaseProfile\n");
 #endif
 
-    if ( pProfile == 0 )
+    if ( pProfile == NULL )
     {
 #ifdef TRACE_OSL_PROFILE
         OSL_TRACE("Out releaseProfile [profile==0]\n");

Modified: openoffice/trunk/main/sal/osl/unx/security.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/security.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/security.c (original)
+++ openoffice/trunk/main/sal/osl/unx/security.c Sun Apr 10 02:30:31 2016
@@ -449,12 +449,12 @@ oslSecurityError SAL_CALL osl_loginUser(
        )
 {
     oslSecurityError Error;
-    rtl_String* strUserName=0;
-    rtl_String* strPassword=0;
-    sal_Char* pszUserName=0;
-    sal_Char* pszPassword=0;
+    rtl_String* strUserName=NULL;
+    rtl_String* strPassword=NULL;
+    sal_Char* pszUserName=NULL;
+    sal_Char* pszPassword=NULL;
     
-    if ( ustrUserName != 0 )
+    if ( ustrUserName != NULL )
     {
         
         rtl_uString2String( &strUserName,
@@ -466,7 +466,7 @@ oslSecurityError SAL_CALL osl_loginUser(
     }
     
 
-    if ( ustrPassword != 0 )
+    if ( ustrPassword != NULL )
     {
         rtl_uString2String( &strPassword,
                             rtl_uString_getStr(ustrPassword),
@@ -479,7 +479,7 @@ oslSecurityError SAL_CALL osl_loginUser(
     
     Error=osl_psz_loginUser(pszUserName,pszPassword,pSecurity);
 
-    if ( strUserName != 0 )
+    if ( strUserName != NULL )
     {    
         rtl_string_release(strUserName);
     }

Modified: openoffice/trunk/main/sal/osl/unx/signal.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/signal.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/signal.c (original)
+++ openoffice/trunk/main/sal/osl/unx/signal.c Sun Apr 10 02:30:31 2016
@@ -161,13 +161,13 @@ static void SignalHandlerFunction(int);
 
 static void getExecutableName_Impl (rtl_String ** ppstrProgName)
 {
-       rtl_uString * ustrProgFile = 0;
+       rtl_uString * ustrProgFile = NULL;
        osl_getExecutableFile (&ustrProgFile);
        if (ustrProgFile)
        {
-               rtl_uString * ustrProgName = 0;
+               rtl_uString * ustrProgName = NULL;
                osl_systemPathGetFileNameOrLastDirectoryPart (ustrProgFile, 
&ustrProgName);
-               if (ustrProgName != 0)
+               if (ustrProgName != NULL)
                {
                        rtl_uString2String (
                                ppstrProgName,
@@ -183,7 +183,7 @@ static void getExecutableName_Impl (rtl_
 static sal_Bool is_soffice_Impl (void)
 {
        sal_Int32    idx       = -1;
-       rtl_String * strProgName = 0;
+       rtl_String * strProgName = NULL;
 
        getExecutableName_Impl (&strProgName);
        if (strProgName)
@@ -205,7 +205,7 @@ static sal_Bool InitSignal()
        {
                sal_uInt32      argi;
                sal_uInt32      argc;
-               rtl_uString *ustrCommandArg = 0;
+               rtl_uString *ustrCommandArg = NULL;
 
                argc = osl_getCommandArgCount();
                for ( argi = 0; argi < argc; argi++ )
@@ -222,7 +222,7 @@ static sal_Bool InitSignal()
                if (ustrCommandArg)
                {
                        rtl_uString_release (ustrCommandArg);
-                       ustrCommandArg = 0;
+                       ustrCommandArg = NULL;
                }
 
                // WORKAROUND FOR SEGV HANDLER CONFLICT

Modified: openoffice/trunk/main/sal/osl/unx/socket.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/socket.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/socket.c (original)
+++ openoffice/trunk/main/sal/osl/unx/socket.c Sun Apr 10 02:30:31 2016
@@ -693,11 +693,11 @@ oslSocketAddr SAL_CALL osl_createInetSoc
        rtl_uString *ustrDottedAddr,
        sal_Int32    Port)
 {
-    rtl_String* strDottedAddr=0;
+    rtl_String* strDottedAddr=NULL;
     oslSocketAddr Addr;
-    sal_Char* pszDottedAddr=0;
+    sal_Char* pszDottedAddr=NULL;
 
-    if ( ustrDottedAddr != 0 )
+    if ( ustrDottedAddr != NULL )
     {
         rtl_uString2String( &strDottedAddr,
                             rtl_uString_getStr(ustrDottedAddr),
@@ -710,7 +710,7 @@ oslSocketAddr SAL_CALL osl_createInetSoc
 
     Addr = osl_psz_createInetSocketAddr(pszDottedAddr, Port);
 
-    if ( strDottedAddr != 0 )
+    if ( strDottedAddr != NULL )
     {
         rtl_string_release(strDottedAddr);
     }
@@ -1149,10 +1149,10 @@ oslHostAddr SAL_CALL osl_createHostAddr
        const oslSocketAddr Addr)
 {
     oslHostAddr HostAddr;
-    rtl_String* strHostname=0;
-    sal_Char* pszHostName=0;
+    rtl_String* strHostname=NULL;
+    sal_Char* pszHostName=NULL;
 
-    if ( ustrHostname != 0 )
+    if ( ustrHostname != NULL )
     {
         rtl_uString2String( &strHostname,
                             rtl_uString_getStr(ustrHostname),
@@ -1164,7 +1164,7 @@ oslHostAddr SAL_CALL osl_createHostAddr
 
     HostAddr = osl_psz_createHostAddr(pszHostName,Addr);
 
-    if ( strHostname != 0 )
+    if ( strHostname != NULL )
     {
         rtl_string_release(strHostname);
     }
@@ -1210,10 +1210,10 @@ oslHostAddr SAL_CALL osl_psz_createHostA
 oslHostAddr SAL_CALL osl_createHostAddrByName(rtl_uString *ustrHostname)
 {
     oslHostAddr HostAddr;
-    rtl_String* strHostname=0;
-    sal_Char* pszHostName=0;
+    rtl_String* strHostname=NULL;
+    sal_Char* pszHostName=NULL;
 
-    if ( ustrHostname != 0 )
+    if ( ustrHostname != NULL )
     {
         rtl_uString2String( &strHostname,
                             rtl_uString_getStr(ustrHostname),
@@ -1225,7 +1225,7 @@ oslHostAddr SAL_CALL osl_createHostAddrB
 
     HostAddr = osl_psz_createHostAddrByName(pszHostName);
 
-    if ( strHostname != 0 )
+    if ( strHostname != NULL )
     {
         rtl_string_release(strHostname);
     }
@@ -1300,7 +1300,7 @@ void SAL_CALL osl_getHostnameOfHostAddr
        const oslHostAddr   Addr,
        rtl_uString       **ustrHostname)
 {
-    const sal_Char* pHostname=0;
+    const sal_Char* pHostname=NULL;
 
     pHostname = osl_psz_getHostnameOfHostAddr(Addr);
 
@@ -1459,10 +1459,10 @@ oslSocketResult SAL_CALL osl_psz_getLoca
 oslSocketAddr SAL_CALL osl_resolveHostname(rtl_uString *ustrHostname)
 {
     oslSocketAddr Addr;
-    rtl_String* strHostname=0;
-    sal_Char* pszHostName=0;
+    rtl_String* strHostname=NULL;
+    sal_Char* pszHostName=NULL;
 
-    if ( ustrHostname != 0 )
+    if ( ustrHostname != NULL )
     {
         rtl_uString2String( &strHostname,
                             rtl_uString_getStr(ustrHostname),
@@ -1475,7 +1475,7 @@ oslSocketAddr SAL_CALL osl_resolveHostna
 
     Addr = osl_psz_resolveHostname(pszHostName);
 
-    if ( strHostname != 0 )
+    if ( strHostname != NULL )
     {
         rtl_string_release(strHostname);
     }
@@ -1507,12 +1507,12 @@ oslSocketAddr SAL_CALL osl_psz_resolveHo
 sal_Int32 SAL_CALL osl_getServicePort(rtl_uString *ustrServicename, 
rtl_uString *ustrProtocol)
 {
     sal_Int32 nPort;
-    rtl_String* strServicename=0;
-    rtl_String* strProtocol=0;
-    sal_Char* pszServiceName=0;
-    sal_Char* pszProtocol=0;
+    rtl_String* strServicename=NULL;
+    rtl_String* strProtocol=NULL;
+    sal_Char* pszServiceName=NULL;
+    sal_Char* pszProtocol=NULL;
 
-    if ( ustrServicename != 0 )
+    if ( ustrServicename != NULL )
     {
         rtl_uString2String( &strServicename,
                             rtl_uString_getStr(ustrServicename),
@@ -1522,7 +1522,7 @@ sal_Int32 SAL_CALL osl_getServicePort(rt
         pszServiceName = rtl_string_getStr(strServicename);
     }
 
-    if ( ustrProtocol != 0 )
+    if ( ustrProtocol != NULL )
     {
         rtl_uString2String( &strProtocol,
                             rtl_uString_getStr(ustrProtocol),
@@ -1534,12 +1534,12 @@ sal_Int32 SAL_CALL osl_getServicePort(rt
 
     nPort = osl_psz_getServicePort(pszServiceName,pszProtocol);
 
-    if ( strServicename != 0 )
+    if ( strServicename != NULL )
     {
         rtl_string_release(strServicename);
     }
 
-    if ( strProtocol != 0 )
+    if ( strProtocol != NULL )
     {
         rtl_string_release(strProtocol);
     }
@@ -1556,7 +1556,7 @@ sal_Int32 SAL_CALL osl_psz_getServicePor
 
        ps= getservbyname(pszServicename, pszProtocol);
 
-       if (ps != 0)
+       if (ps != NULL)
                return ntohs(ps->s_port);
 
        return OSL_INVALID_PORT;
@@ -2312,7 +2312,7 @@ sal_Int32 SAL_CALL osl_receiveFromSocket
                                                      oslSocketMsgFlag Flag)
 {
     int nRead;
-       struct sockaddr *pSystemSockAddr = 0;
+       struct sockaddr *pSystemSockAddr = NULL;
        socklen_t AddrLen = 0;
        if( pSenderAddr )
        {
@@ -2402,7 +2402,7 @@ sal_Int32 SAL_CALL osl_sendToSocket(oslS
 {
     int nWritten;
 
-       struct sockaddr *pSystemSockAddr = 0;
+       struct sockaddr *pSystemSockAddr = NULL;
        int AddrLen = 0;
        if( ReceiverAddr )
        {

Modified: openoffice/trunk/main/sal/osl/unx/system.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/system.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/system.c (original)
+++ openoffice/trunk/main/sal/osl/unx/system.c Sun Apr 10 02:30:31 2016
@@ -76,7 +76,7 @@ struct passwd *getpwnam_r(const char* na
                        res = s;
                } 
                else 
-                       res = 0;
+                       res = NULL;
        }       
        
        pthread_mutex_unlock(&getrtl_mutex);
@@ -212,7 +212,7 @@ struct spwd *getspnam_r(const char *name
                        res = s;
                } 
                else 
-                       res = 0;
+                       res = NULL;
        }
 
        pthread_mutex_unlock(&getrtl_mutex);
@@ -273,7 +273,7 @@ struct passwd *getpwnam_r(const char* na
                        res = s;
                } 
                else 
-                       res = 0;
+                       res = NULL;
        }       
        
        pthread_mutex_unlock(&getrtl_mutex);

Modified: openoffice/trunk/main/sal/osl/unx/tempfile.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/tempfile.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/tempfile.c (original)
+++ openoffice/trunk/main/sal/osl/unx/tempfile.c Sun Apr 10 02:30:31 2016
@@ -138,8 +138,8 @@ static oslFileError osl_setup_base_direc
        rtl_uString*  pustrDirectoryURL,
        rtl_uString** ppustr_base_dir)
 {
-       rtl_uString* dir_url = 0;
-       rtl_uString* dir     = 0;
+       rtl_uString* dir_url = NULL;
+       rtl_uString* dir     = NULL;
     oslFileError error   = osl_File_E_None;                     
     
        if (pustrDirectoryURL)
@@ -176,9 +176,10 @@ static oslFileError osl_setup_base_direc
  {
        oslFileError osl_error;
        
-       OSL_PRECOND(((0 != pHandle) || (0 != ppustrTempFileURL)), "Invalid 
parameter!");
+       OSL_PRECOND(((NULL != pHandle) || (NULL != ppustrTempFileURL)),
+                   "Invalid parameter!");
        
-       if ((0 == pHandle) && (0 == ppustrTempFileURL))
+       if ((NULL == pHandle) && (NULL == ppustrTempFileURL))
        {
                osl_error = osl_File_E_INVAL;
        }
@@ -187,7 +188,7 @@ static oslFileError osl_setup_base_direc
                osl_error = osl_setup_base_directory_impl_(
                        pustrDirectoryURL, ppustr_base_dir);
                        
-               *b_delete_on_close = (0 == ppustrTempFileURL);
+               *b_delete_on_close = (NULL == ppustrTempFileURL);
        }
        
        return osl_error;
@@ -203,10 +204,10 @@ static oslFileError osl_create_temp_file
        oslFileHandle* file_handle,
        rtl_uString** ppustr_temp_file_name)
 {
-       rtl_uString*        rand_name        = 0;
+       rtl_uString*        rand_name        = NULL;
        sal_uInt32          len_base_dir     = 0;
-       rtl_uString*        tmp_file_path    = 0;
-       rtl_uString*        tmp_file_url     = 0;
+       rtl_uString*        tmp_file_path    = NULL;
+       rtl_uString*        tmp_file_url     = NULL;
        sal_Int32           capacity         = 0;
        oslFileError        osl_error        = osl_File_E_None;
        sal_Int32           offset_file_name;
@@ -307,8 +308,8 @@ oslFileError SAL_CALL osl_createTempFile
        oslFileHandle* pHandle, 
        rtl_uString**  ppustrTempFileURL)
 {
-       rtl_uString*  base_directory     = 0;   
-       rtl_uString*  temp_file_name     = 0;
+       rtl_uString*  base_directory     = NULL;        
+       rtl_uString*  temp_file_name     = NULL;
        oslFileHandle temp_file_handle;
        sal_Bool      b_delete_on_close;
        oslFileError  osl_error;
@@ -328,7 +329,7 @@ oslFileError SAL_CALL osl_createTempFile
                                                                
        if (osl_File_E_None == osl_error) 
        {               
-               rtl_uString* temp_file_url = 0;         
+               rtl_uString* temp_file_url = NULL;              
                
                /* assuming this works */
                osl_getFileURLFromSystemPath(temp_file_name, &temp_file_url);

Modified: openoffice/trunk/main/sal/osl/unx/thread.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/thread.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/thread.c (original)
+++ openoffice/trunk/main/sal/osl/unx/thread.c Sun Apr 10 02:30:31 2016
@@ -186,7 +186,7 @@ static void osl_thread_destruct_Impl (Th
                pthread_mutex_destroy (&((*ppImpl)->m_Lock));
 
                free (*ppImpl);
-               (*ppImpl) = 0;
+               (*ppImpl) = NULL;
        }
 }
 

Modified: openoffice/trunk/main/sal/osl/unx/util.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/util.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/util.c (original)
+++ openoffice/trunk/main/sal/osl/unx/util.c Sun Apr 10 02:30:31 2016
@@ -64,7 +64,7 @@ sal_Bool SAL_CALL osl_getEthernetAddress
        return sal_False;
 #else
        
-       if ( pAddr == 0 )
+       if ( pAddr == NULL )
        {
                return sal_False;
        }

Modified: openoffice/trunk/main/sal/osl/w32/dllentry.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/w32/dllentry.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/w32/dllentry.c (original)
+++ openoffice/trunk/main/sal/osl/w32/dllentry.c Sun Apr 10 02:30:31 2016
@@ -128,7 +128,7 @@ __do_global_ctors (void)
    */
   if (nptrs == -1)
     {
-      for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
+      for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != NULL; nptrs++)
        ;
     }
 

Modified: openoffice/trunk/main/sal/osl/w32/security.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/w32/security.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/w32/security.c (original)
+++ openoffice/trunk/main/sal/osl/w32/security.c Sun Apr 10 02:30:31 2016
@@ -605,7 +605,7 @@ sal_Bool SAL_CALL osl_loadUserProfile(os
 
                        if (fLoadUserProfile && fUnloadUserProfile)
                        {
-                               rtl_uString     *buffer = 0;
+                               rtl_uString     *buffer = NULL;
                                PROFILEINFOW    pi;
 
                                getUserNameImpl(Security, &buffer, sal_False);

Modified: openoffice/trunk/main/sal/osl/w32/thread.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/w32/thread.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/w32/thread.c (original)
+++ openoffice/trunk/main/sal/osl/w32/thread.c Sun Apr 10 02:30:31 2016
@@ -82,7 +82,7 @@ static oslThread oslCreateThread(oslWork
 
        OSL_ASSERT(pThreadImpl);
 
-    if ( pThreadImpl == 0 )
+    if ( pThreadImpl == NULL )
     {
         return 0;
     }
@@ -250,7 +250,7 @@ oslThreadPriority SAL_CALL osl_getThread
        osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
        /* invalid arguments ?*/
-       if(pThreadImpl==0 || pThreadImpl->m_hThread==0) 
+       if(pThreadImpl==NULL || pThreadImpl->m_hThread==0) 
        {
                return osl_Thread_PriorityUnknown;
        }
@@ -307,7 +307,7 @@ sal_Bool SAL_CALL osl_isThreadRunning(co
        osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
        /* invalid arguments ?*/
-       if(pThreadImpl==0 || pThreadImpl->m_hThread==0) 
+       if(pThreadImpl==NULL || pThreadImpl->m_hThread==0) 
        {
                return sal_False;
        }
@@ -323,7 +323,7 @@ void SAL_CALL osl_joinWithThread(oslThre
        osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
        /* invalid arguments?*/
-       if(pThreadImpl==0 || pThreadImpl->m_hThread==0) 
+       if(pThreadImpl==NULL || pThreadImpl->m_hThread==0) 
        {
                /* assume thread is not running */
                return;
@@ -353,7 +353,7 @@ void SAL_CALL osl_terminateThread(oslThr
        osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
 
        /* invalid arguments?*/
-       if (pThreadImpl==0 || pThreadImpl->m_hThread==0) 
+       if (pThreadImpl==NULL || pThreadImpl->m_hThread==0) 
        {
                /* assume thread is not running */
                return;
@@ -373,7 +373,7 @@ sal_Bool SAL_CALL osl_scheduleThread(osl
        osl_yieldThread();
 
        /* invalid arguments?*/
-       if (pThreadImpl==0 || pThreadImpl->m_hThread==0) 
+       if (pThreadImpl==NULL || pThreadImpl->m_hThread==0) 
        {
                /* assume thread is not running */
                return sal_False;
@@ -432,7 +432,7 @@ static void AddKeyToList( PTLS pTls )
                EnterCriticalSection( &g_ThreadKeyListCS );
 
                pTls->pNext = g_pThreadKeyList;
-               pTls->pPrev = 0;
+               pTls->pPrev = NULL;
                
                if ( g_pThreadKeyList )
                        g_pThreadKeyList->pPrev = pTls;
@@ -497,7 +497,7 @@ oslThreadKey SAL_CALL osl_createThreadKe
                if ( (DWORD)-1 == (pTls->dwIndex = TlsAlloc()) )
                {
                        rtl_freeMemory( pTls );
-                       pTls = 0;
+                       pTls = NULL;
                }
                else
                        AddKeyToList( pTls );

Modified: openoffice/trunk/main/sal/osl/w32/time.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/w32/time.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/w32/time.c (original)
+++ openoffice/trunk/main/sal/osl/w32/time.c Sun Apr 10 02:30:31 2016
@@ -41,7 +41,7 @@ sal_Bool SAL_CALL osl_getSystemTime(Time
        FILETIME   CurTime, OffTime;
        __int64    Value;
 
-       OSL_ASSERT(pTimeVal != 0);
+       OSL_ASSERT(pTimeVal != NULL);
 
        GetSystemTime(&SystemTime);
        SystemTimeToFileTime(&SystemTime, &CurTime);

Modified: openoffice/trunk/main/sal/rtl/source/alloc_arena.c
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/rtl/source/alloc_arena.c?rev=1738404&r1=1738403&r2=1738404&view=diff
==============================================================================
--- openoffice/trunk/main/sal/rtl/source/alloc_arena.c (original)
+++ openoffice/trunk/main/sal/rtl/source/alloc_arena.c Sun Apr 10 02:30:31 2016
@@ -62,7 +62,7 @@ static struct rtl_arena_list_st g_arena_
  *
  *  @internal
  */
-static rtl_arena_type * gp_arena_arena = 0;
+static rtl_arena_type * gp_arena_arena = NULL;
 
 
 /** gp_machdep_arena
@@ -72,7 +72,7 @@ static rtl_arena_type * gp_arena_arena =
  *
  *  @internal
  */
-static rtl_arena_type * gp_machdep_arena = 0;
+static rtl_arena_type * gp_machdep_arena = NULL;
 
 
 static void *
@@ -94,7 +94,7 @@ rtl_machdep_pagesize (void);
 
 /** gp_default_arena
  */
-rtl_arena_type * gp_default_arena = 0;
+rtl_arena_type * gp_default_arena = NULL;
 
 
 /** rtl_arena_init()
@@ -150,7 +150,7 @@ rtl_arena_segment_populate (
        sal_Size                size = rtl_machdep_pagesize();
 
     span = rtl_machdep_alloc(gp_machdep_arena, &size);
-       if (span != 0)
+       if (span != NULL)
        {
         rtl_arena_segment_type *first, *last, *head;
                sal_Size                count = size / 
sizeof(rtl_arena_segment_type);
@@ -173,7 +173,7 @@ rtl_arena_segment_populate (
                        first->m_type = 0;
                }
        }
-       return (span != 0);
+       return (span != NULL);
 }
 
 
@@ -190,7 +190,7 @@ rtl_arena_segment_get (
 {
     rtl_arena_segment_type * head;
 
-    OSL_ASSERT(*ppSegment == 0);
+    OSL_ASSERT(*ppSegment == NULL);
 
     head = &(arena->m_segment_reserve_head);
     if ((head->m_snext != head) || rtl_arena_segment_populate (arena))
@@ -232,7 +232,7 @@ rtl_arena_segment_put (
        QUEUE_INSERT_HEAD_NAMED(head, (*ppSegment), s);
 
        /* clear */
-       (*ppSegment) = 0;
+       (*ppSegment) = NULL;
 }
 
 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
@@ -317,7 +317,7 @@ rtl_arena_hash_rescale (
        new_bytes = new_size * sizeof(rtl_arena_segment_type*);
        new_table = (rtl_arena_segment_type **)rtl_arena_alloc (gp_arena_arena, 
&new_bytes);
 
-       if (new_table != 0)
+       if (new_table != NULL)
        {
                rtl_arena_segment_type ** old_table;
                sal_Size                  old_size, i;
@@ -361,7 +361,7 @@ rtl_arena_hash_rescale (
                for (i = 0; i < old_size; i++)
                {
                        rtl_arena_segment_type * curr = old_table[i];
-                       while (curr != 0)
+                       while (curr != NULL)
                        {
                                rtl_arena_segment_type  * next = curr->m_fnext;
                                rtl_arena_segment_type ** head;
@@ -372,7 +372,7 @@ rtl_arena_hash_rescale (
 
                                curr = next;
                        }
-                       old_table[i] = 0;
+                       old_table[i] = NULL;
                }
 
                RTL_MEMORY_LOCK_RELEASE(&(arena->m_lock));
@@ -429,7 +429,7 @@ rtl_arena_hash_remove (
 #endif /* OSL_DEBUG_LEVEL */
 
        segpp = &(arena->m_hash_table[RTL_ARENA_HASH_INDEX(arena, addr)]);
-       while ((segment = *segpp) != 0)
+       while ((segment = *segpp) != NULL)
        {
                if (segment->m_addr == addr)
                {
@@ -442,8 +442,8 @@ rtl_arena_hash_remove (
                segpp = &(segment->m_fnext);
        }
 
-       OSL_POSTCOND(segment != 0, "rtl_arena_hash_remove(): bad free.");
-       if (segment != 0)
+       OSL_POSTCOND(segment != NULL, "rtl_arena_hash_remove(): bad free.");
+       if (segment != NULL)
        {
                OSL_POSTCOND(segment->m_size == size, "rtl_arena_hash_remove(): 
wrong size.");
 
@@ -490,7 +490,7 @@ rtl_arena_segment_alloc (
 {
        int index = 0;
 
-       OSL_ASSERT(*ppSegment == 0);
+       OSL_ASSERT(*ppSegment == NULL);
        if (!RTL_MEMORY_ISP2(size))
        {
                int msb = highbit(size);
@@ -528,12 +528,12 @@ rtl_arena_segment_alloc (
        }
 
 dequeue_and_leave:
-       if (*ppSegment != 0)
+       if (*ppSegment != NULL)
        {
                /* remove from freelist */
                rtl_arena_freelist_remove (arena, (*ppSegment));
        }
-       return (*ppSegment != 0);
+       return (*ppSegment != NULL);
 }
 
 
@@ -550,15 +550,15 @@ rtl_arena_segment_create (
        rtl_arena_segment_type ** ppSegment
 )
 {
-       OSL_ASSERT((*ppSegment) == 0);
+       OSL_ASSERT((*ppSegment) == NULL);
        if (arena->m_source_alloc != 0)
        {
                rtl_arena_segment_get (arena, ppSegment);
-               if (*ppSegment != 0)
+               if (*ppSegment != NULL)
                {
-                       rtl_arena_segment_type * span = 0;
+                       rtl_arena_segment_type * span = NULL;
                        rtl_arena_segment_get (arena, &span);
-                       if (span != 0)
+                       if (span != NULL)
                        {
                                /* import new span from source arena */
                                RTL_MEMORY_LOCK_RELEASE(&(arena->m_lock));
@@ -747,8 +747,8 @@ rtl_arena_activate (
        void   (SAL_CALL * source_free) (rtl_arena_type *, void *, sal_Size)
 )
 {
-       OSL_ASSERT(arena != 0);
-       if (arena != 0)
+       OSL_ASSERT(arena != NULL);
+       if (arena != NULL)
        {
                (void) snprintf (arena->m_name, sizeof(arena->m_name), "%s", 
name);
 
@@ -852,7 +852,7 @@ rtl_arena_deactivate (
                /* cleanup still used segment(s) */
                for (i = 0, n = arena->m_hash_size; i < n; i++)
                {
-                       while ((segment = arena->m_hash_table[i]) != 0)
+                       while ((segment = arena->m_hash_table[i]) != NULL)
                        {
                                /* pop from hash table */
                                arena->m_hash_table[i] = segment->m_fnext, 
segment->m_fnext = segment->m_fprev = segment;
@@ -998,7 +998,7 @@ SAL_CALL rtl_arena_destroy (
        rtl_arena_type * arena
 ) 
 {
-       if (arena != 0)
+       if (arena != NULL)
        {
                rtl_arena_deactivate (arena);
                rtl_arena_destructor (arena);
@@ -1293,7 +1293,7 @@ rtl_arena_once_init (void)
                /* machdep (pseudo) arena */
                static rtl_arena_type g_machdep_arena;
 
-               OSL_ASSERT(gp_machdep_arena == 0);
+               OSL_ASSERT(gp_machdep_arena == NULL);
                VALGRIND_CREATE_MEMPOOL(&g_machdep_arena, 0, 0);
                rtl_arena_constructor (&g_machdep_arena);
 
@@ -1304,13 +1304,13 @@ rtl_arena_once_init (void)
                        0,       /* no quantum caching */
                        0, 0, 0  /* no source */
                );
-               OSL_ASSERT(gp_machdep_arena != 0);
+               OSL_ASSERT(gp_machdep_arena != NULL);
        }
        {
                /* default arena */
                static rtl_arena_type g_default_arena;
 
-               OSL_ASSERT(gp_default_arena == 0);
+               OSL_ASSERT(gp_default_arena == NULL);
                VALGRIND_CREATE_MEMPOOL(&g_default_arena, 0, 0);
                rtl_arena_constructor (&g_default_arena);
 
@@ -1323,13 +1323,13 @@ rtl_arena_once_init (void)
                        rtl_machdep_alloc,
                        rtl_machdep_free
                );
-               OSL_ASSERT(gp_default_arena != 0);
+               OSL_ASSERT(gp_default_arena != NULL);
        }
        {
                /* arena internal arena */
                static rtl_arena_type g_arena_arena;
 
-               OSL_ASSERT(gp_arena_arena == 0);
+               OSL_ASSERT(gp_arena_arena == NULL);
                VALGRIND_CREATE_MEMPOOL(&g_arena_arena, 0, 0);
                rtl_arena_constructor (&g_arena_arena);
 
@@ -1342,7 +1342,7 @@ rtl_arena_once_init (void)
                        rtl_arena_alloc,
                        rtl_arena_free
                );
-               OSL_ASSERT(gp_arena_arena != 0);
+               OSL_ASSERT(gp_arena_arena != NULL);
        }
 }
 
@@ -1351,7 +1351,7 @@ rtl_arena_init (void)
 {
        static sal_once_type g_once = SAL_ONCE_INIT;
        SAL_ONCE(&g_once, rtl_arena_once_init);
-       return (gp_arena_arena != 0);
+       return (gp_arena_arena != NULL);
 }
 
 /* ================================================================= */
@@ -1377,7 +1377,7 @@ static void rtl_arena_fini (void);
 void
 rtl_arena_fini (void)
 {
-       if (gp_arena_arena != 0)
+       if (gp_arena_arena != NULL)
        {
                rtl_arena_type * arena, * head;
 


Reply via email to