Bug 782916 - Do not compare nsresult to noErr; r=smontagu

This commit is contained in:
Aryeh Gregor 2012-08-16 14:58:12 +03:00
parent 5b014008d1
commit 3b2e0e023a

View File

@ -56,7 +56,8 @@ nsresult nsCollationMacUC::ConvertLocale(nsILocale* aNSLocale, LocaleRef* aMacLo
nsAutoString localeString;
nsresult res = aNSLocale->GetCategory(NS_LITERAL_STRING("NSILOCALE_COLLATE"), localeString);
NS_ENSURE_TRUE(res == noErr && !localeString.IsEmpty(), NS_ERROR_FAILURE);
NS_ENSURE_TRUE(NS_SUCCEEDED(res) && !localeString.IsEmpty(),
NS_ERROR_FAILURE);
NS_LossyConvertUTF16toASCII tmp(localeString);
tmp.ReplaceChar('-', '_');
OSStatus err;