mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Initializing return values before they are used.
This commit is contained in:
parent
ca069e57e9
commit
d50e282b56
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user