From ffdb88e73ad23b28638c2ecd8d2458e1f4cb681b Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Fri, 16 Apr 1999 20:58:21 +0000 Subject: [PATCH] Fix assert to be >= 0. part of the name space off by one problem... git-svn-id: svn://10.0.0.236/trunk@27902 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/imap/src/nsIMAPHostSessionList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/mailnews/imap/src/nsIMAPHostSessionList.cpp b/mozilla/mailnews/imap/src/nsIMAPHostSessionList.cpp index 9d7e075ba0a..2a6a388a2cc 100644 --- a/mozilla/mailnews/imap/src/nsIMAPHostSessionList.cpp +++ b/mozilla/mailnews/imap/src/nsIMAPHostSessionList.cpp @@ -498,7 +498,7 @@ NS_IMETHODIMP nsIMAPHostSessionList::SetNamespacesOverridableForHost(const char NS_IMETHODIMP nsIMAPHostSessionList::GetNumberOfNamespacesForHost(const char *hostName, const char *userName, PRUint32 &result) { - PRInt32 intResult; + PRInt32 intResult = 0; PR_EnterMonitor(gCachedHostInfoMonitor); nsIMAPHostInfo *host = FindHost(hostName, userName); @@ -507,7 +507,7 @@ NS_IMETHODIMP nsIMAPHostSessionList::GetNumberOfNamespacesForHost(const char *ho intResult = host->fNamespaceList->GetNumberOfNamespaces(); } PR_ExitMonitor(gCachedHostInfoMonitor); - NS_ASSERTION(intResult > 0, "negative number of namespaces"); + NS_ASSERTION(intResult >= 0, "negative number of namespaces"); result = (PRUint32) intResult; return (host == NULL) ? NS_ERROR_ILLEGAL_VALUE : NS_OK; }