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
This commit is contained in:
mscott%netscape.com
1999-04-16 20:58:21 +00:00
parent ad7c6f4185
commit ffdb88e73a

View File

@@ -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;
}