diff --git a/mozilla/modules/libreg/xpcom/nsRegistry.cpp b/mozilla/modules/libreg/xpcom/nsRegistry.cpp index 6f211574292..29ca33064cc 100644 --- a/mozilla/modules/libreg/xpcom/nsRegistry.cpp +++ b/mozilla/modules/libreg/xpcom/nsRegistry.cpp @@ -447,7 +447,7 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) { directoryService->Get("xpcom.currentProcess.componentRegistry", NS_GET_IID(nsIFile), getter_AddRefs(registryLocation)); - if (registryLocation != nsnull) + if (registryLocation) { foundReg = PR_TRUE; registryLocation->GetPath(®File); // dougt fix... diff --git a/mozilla/xpcom/components/nsRegistry.cpp b/mozilla/xpcom/components/nsRegistry.cpp index 6f211574292..29ca33064cc 100644 --- a/mozilla/xpcom/components/nsRegistry.cpp +++ b/mozilla/xpcom/components/nsRegistry.cpp @@ -447,7 +447,7 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) { directoryService->Get("xpcom.currentProcess.componentRegistry", NS_GET_IID(nsIFile), getter_AddRefs(registryLocation)); - if (registryLocation != nsnull) + if (registryLocation) { foundReg = PR_TRUE; registryLocation->GetPath(®File); // dougt fix... diff --git a/mozilla/xpcom/io/nsLocalFileCommon.cpp b/mozilla/xpcom/io/nsLocalFileCommon.cpp index 7d53218790b..a63c0bcd77e 100644 --- a/mozilla/xpcom/io/nsLocalFileCommon.cpp +++ b/mozilla/xpcom/io/nsLocalFileCommon.cpp @@ -128,8 +128,8 @@ nsFSStringConversion::PrepareFSCharset() { // lazy eval of the file system charset NS_WITH_SERVICE(nsIPlatformCharset, pcharset, NS_PLATFORMCHARSET_PROGID, &res); - NS_ASSERTION((NS_SUCCEEDED(res) && (nsnull != pcharset)), "cannot get platform charset"); - if(NS_SUCCEEDED(res) && (nsnull != pcharset)) { + NS_ASSERTION((NS_SUCCEEDED(res) && pcharset), "cannot get platform charset"); + if(NS_SUCCEEDED(res) && pcharset) { res = pcharset->GetCharset(kPlatformCharsetSel_FileName, mFSCharset); } } @@ -139,17 +139,17 @@ NS_IMETHODIMP nsFSStringConversion::PrepareEncoder() { nsresult res = NS_OK; - if(nsnull == mEncoder) + if(! mEncoder) { res = PrepareFSCharset(); if(NS_SUCCEEDED(res)) { NS_WITH_SERVICE(nsICharsetConverterManager, ucmgr, NS_CHARSETCONVERTERMANAGER_PROGID, &res); - NS_ASSERTION((NS_SUCCEEDED(res) && (nsnull != ucmgr)), + NS_ASSERTION((NS_SUCCEEDED(res) && ucmgr), "cannot get charset converter manager "); - if(NS_SUCCEEDED(res) && (nsnull != ucmgr)) + if(NS_SUCCEEDED(res) && ucmgr) res = ucmgr->GetUnicodeEncoder( &mFSCharset, getter_AddRefs(mEncoder)); - NS_ASSERTION((NS_SUCCEEDED(res) && (nsnull != mEncoder)), + NS_ASSERTION((NS_SUCCEEDED(res) && mEncoder), "cannot find the unicode encoder"); } } @@ -159,17 +159,17 @@ NS_IMETHODIMP nsFSStringConversion::PrepareDecoder() { nsresult res = NS_OK; - if(nsnull == mDecoder) + if(! mDecoder) { res = PrepareFSCharset(); if(NS_SUCCEEDED(res)) { NS_WITH_SERVICE(nsICharsetConverterManager, ucmgr, NS_CHARSETCONVERTERMANAGER_PROGID, &res); - NS_ASSERTION((NS_SUCCEEDED(res) && (nsnull != ucmgr)), + NS_ASSERTION((NS_SUCCEEDED(res) && ucmgr), "cannot get charset converter manager "); - if(NS_SUCCEEDED(res) && (nsnull != ucmgr)) + if(NS_SUCCEEDED(res) && ucmgr) res = ucmgr->GetUnicodeDecoder( &mFSCharset, getter_AddRefs(mDecoder)); - NS_ASSERTION((NS_SUCCEEDED(res) && (nsnull != mDecoder)), + NS_ASSERTION((NS_SUCCEEDED(res) && mDecoder), "cannot find the unicode decoder"); } } diff --git a/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp b/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp index be9fd25fba8..ff97a6fe59a 100644 --- a/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp +++ b/mozilla/xpcom/proxy/src/nsProxyObjectManager.cpp @@ -121,7 +121,7 @@ nsProxyObjectManager::~nsProxyObjectManager() nsProxyObjectManager * nsProxyObjectManager::GetInstance() { - if (mInstance == nsnull) + if (! mInstance) { mInstance = new nsProxyObjectManager(); } @@ -163,7 +163,7 @@ nsProxyObjectManager::GetProxyObject(nsIEventQueue *destQueue, REFNSIID aIID, ns // check to see if the eventQ is on our thread. If so, just return the real object. - if (postQ != nsnull && !(proxyType & PROXY_ASYNC) && !(proxyType & PROXY_ALWAYS)) + if (postQ && !(proxyType & PROXY_ASYNC) && !(proxyType & PROXY_ALWAYS)) { PRBool aResult; postQ->IsQueueOnCurrentThread(&aResult);