From 46408469d7c2cb7fe8603b8df77302b6640567f0 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 22 Jun 1999 23:26:06 +0000 Subject: [PATCH] don't compare an nsCOMPtr with NULL --- mailnews/db/msgdb/src/nsMsgDatabase.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp index 3c7c48240c4..a577efe2092 100644 --- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp +++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp @@ -380,7 +380,8 @@ NS_IMETHODIMP nsMsgDatabase::QueryInterface(REFNSIID aIID, void** aResult) static nsIMdbFactory *gMDBFactory = nsnull; if (!gMDBFactory) { - nsresult rv = nsComponentManager::CreateInstance(kCMorkFactory, nsnull, nsIMdbFactoryFactory::GetIID(), (void **) &gMDBFactory); + nsresult rv; + rv = nsComponentManager::CreateInstance(kCMorkFactory, nsnull, nsIMdbFactoryFactory::GetIID(), (void **) &gMDBFactory); } return gMDBFactory; } @@ -2279,7 +2280,7 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsMsgHdr* newHdr, PRBool &newThread) nsAutoString subject (eOneByte); newHdr->GetSubject(subject); - if ((ThreadBySubjectWithoutRe() || (newHdrFlags & MSG_FLAG_HAS_RE)) && thread == NULL) + if ((ThreadBySubjectWithoutRe() || (newHdrFlags & MSG_FLAG_HAS_RE)) && (!thread)) { thread = getter_AddRefs(GetThreadForSubject(subject.GetBuffer())); if(thread) @@ -2294,7 +2295,7 @@ nsresult nsMsgDatabase::ThreadNewHdr(nsMsgHdr* newHdr, PRBool &newThread) } #endif // SUBJ_THREADING - if (thread == NULL) + if (!thread) { // couldn't find any parent articles - msgHdr is top-level thread, for now result = AddNewThread(newHdr);