Initializing return values before they are used.

This commit is contained in:
dougt%netscape.com 2000-01-31 23:06:04 +00:00
parent ca069e57e9
commit d50e282b56

View File

@ -366,7 +366,7 @@ class nsDirEnumerator : public nsISimpleEnumerator
NS_IMETHOD HasMoreElements(PRBool *result)
{
nsresult rv;
nsresult rv = NS_OK;
if (mNext == nsnull && mDir)
{
char* name = My_ReadDir(mDir, PR_SKIP_BOTH);
@ -408,7 +408,7 @@ class nsDirEnumerator : public nsISimpleEnumerator
NS_IMETHOD GetNext(nsISupports **result)
{
nsresult rv;
nsresult rv = NS_OK;
PRBool hasMore;
rv = HasMoreElements(&hasMore);
if (NS_FAILED(rv)) return rv;