nsresult rv = NS_OK;  nsCOMPtr<nsISupports> supports;  if (!mNameLookupTable.Get(aName, getter_AddRefs(supports))) return rv;  if (supports) {  CallQueryInterface(supports, aReturn);  if (!*aReturn) {  nsCOMPtr<nsIDOMNodeList> nodeList(do_QueryInterface(supports)); NS_WARN_IF_FALSE(nodeList, "Huh, what's going one here?");  if (nodeList) {   rv = nodeList->Item(0, aReturn); } } }  return rv;
return NS_OK;
nsFormControlList::NamedItem(const nsAString& aName,                             nsIDOMNode** aReturn){  *aReturn = nsnull;  nsresult rv = NS_OK;  nsCOMPtr<nsISupports> supports;    if (!mNameLookupTable.Get(aName, getter_AddRefs(supports))) // key not found     return rv;  if (supports) {    // We found something, check if it's a node    CallQueryInterface(supports, aReturn);    if (!*aReturn) {      // If not, we check if it's a node list.      nsCOMPtr<nsIDOMNodeList> nodeList(do_QueryInterface(supports));      NS_WARN_IF_FALSE(nodeList, "Huh, what's going one here?");      if (nodeList) {        // And since we're only asking for one node here, we return the first        // one from the list.        rv = nodeList->Item(0, aReturn);      }    }  }  return rv;}