Bug 802458: Remove useless "NS_SUCCEEDED(rv)" in icon/gtk/nsIconChannel.cpp, and declare rv down where it's used. r=karlt

This commit is contained in:
Daniel Holbert 2012-10-16 22:18:10 -07:00
parent 4c76e85e43
commit 461f07928c

View File

@ -424,8 +424,6 @@ nsIconChannel::InitWithGnome(nsIMozIconURI *aIconURI)
nsresult
nsIconChannel::InitWithGIO(nsIMozIconURI *aIconURI)
{
nsresult rv;
GIcon *icon = NULL;
nsCOMPtr<nsIURL> fileURI;
@ -483,8 +481,6 @@ nsIconChannel::InitWithGIO(nsIMozIconURI *aIconURI)
int32_t iconSize = GetIconSize(aIconURI);
if (icon) {
NS_SUCCEEDED(rv);
// Use icon and theme to get GtkIconInfo
iconInfo = gtk_icon_theme_lookup_by_gicon(iconTheme,
icon, iconSize,
@ -509,7 +505,7 @@ nsIconChannel::InitWithGIO(nsIMozIconURI *aIconURI)
return NS_ERROR_UNEXPECTED;
}
rv = ScaleIconBuf(&buf, iconSize);
nsresult rv = ScaleIconBuf(&buf, iconSize);
NS_ENSURE_SUCCESS(rv, rv);
rv = moz_gdk_pixbuf_to_channel(buf, aIconURI,