Bug 1155765 - Get rid of gratuitous goto from nsWebBrowserPersist::MakeFilenameFromURI(). r=smaug

This commit is contained in:
Andrew McCreight 2015-04-17 15:22:00 +02:00
parent 18df16548c
commit 76a68d3ce7

View File

@ -2087,7 +2087,8 @@ nsWebBrowserPersist::MakeFilenameFromURI(nsIURI *aURI, nsString &aFilename)
if (mPersistFlags & PERSIST_FLAGS_DONT_CHANGE_FILENAMES)
{
fileName.AssignWithConversion(NS_UnescapeURL(nameFromURL).get());
goto end;
aFilename = fileName;
return NS_OK;
}
if (!nameFromURL.IsEmpty())
{
@ -2127,7 +2128,6 @@ nsWebBrowserPersist::MakeFilenameFromURI(nsIURI *aURI, nsString &aFilename)
fileName.Append(char16_t('a')); // 'a' is for arbitrary
}
end:
aFilename = fileName;
return NS_OK;
}