res = AddMenuItemArrayToContainer(aRDFServ, aCCMan, aContainer, &chardetArray, kNC_CharsetDetector);
res = AddMenuItemArrayToContainer(aRDFServ, aContainer, &chardetArray, kNC_CharsetDetector);
nsresult nsCharsetMenu::InitChardetMenu(                        nsIRDFService * aRDFServ,                         nsICharsetConverterManager2 * aCCMan,                         nsIRDFContainer * aContainer){  nsresult res = NS_OK;  nsVoidArray chardetArray;  nsCOMPtr<nsISupportsArray> array;  res = aCCMan->GetCharsetDetectorList(getter_AddRefs(array));  if (NS_FAILED(res)) goto done;  res = AddCharsetArrayToItemArray(aCCMan, &chardetArray, array);  if (NS_FAILED(res)) goto done;  // reorder the array  res = ReorderMenuItemArray(&chardetArray);  if (NS_FAILED(res)) goto done;  res = AddMenuItemArrayToContainer(aRDFServ, aCCMan, aContainer,     &chardetArray, kNC_CharsetDetector);  if (NS_FAILED(res)) goto done;done:  // free the elements in the VoidArray  FreeMenuItemArray(&chardetArray);  return res;}