Bug 133711 Unreachable statement (duplicate return) in nsXULAttribute and nsSVGAttributes (Bugs found via linting....)

patch by riceman+bmo@mail.rit.edu r=timeless sr=bz
This commit is contained in:
timeless%mozdev.org 2003-03-05 02:35:27 +00:00
Родитель 33e7c21a66
Коммит 51b1da374a
2 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -926,14 +926,12 @@ nsSVGAttributes::RemoveNamedItem(const nsAString& aName,
nsIDOMNode** aReturn)
{
nsCOMPtr<nsIDOMElement> element( do_QueryInterface(mContent) );
*aReturn = nsnull;
if (element) {
// XXX should set aReturn to the element we are about to remove
return element->RemoveAttribute(aName);
*aReturn = nsnull; // XXX should be the element we just removed
return NS_OK;
}
else {
return NS_ERROR_FAILURE;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP

Просмотреть файл

@ -682,14 +682,12 @@ nsXULAttributes::RemoveNamedItem(const nsAString& aName,
nsIDOMNode** aReturn)
{
nsCOMPtr<nsIDOMElement> element( do_QueryInterface(mContent) );
*aReturn = nsnull;
if (element) {
// XXX should set aReturn to the element we are about to remove
return element->RemoveAttribute(aName);
*aReturn = nsnull; // XXX should be the element we just removed
return NS_OK;
}
else {
return NS_ERROR_FAILURE;
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP