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 bceb79b8d5
commit 87cadc49af

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;