if (objAccess->MimeObjectWrite(mimeObject, data, length, user_visible_p) == NS_OK)
if (NS_SUCCEEDED(objAccess->MimeObjectWrite(mimeObject, data, length, user_visible_p)))
COM_MimeObject_write(void *mimeObject, char *data, PRInt32 length,                      PRBool user_visible_p){  nsCOMPtr<nsIMimeObjectClassAccess>  objAccess;  PRInt32                             rc=-1;  nsresult res = nsComponentManager::CreateInstance(kMimeObjectClassAccessCID,                                                     NULL, nsIMimeObjectClassAccess::GetIID(),                                                     (void **) getter_AddRefs(objAccess));   if (NS_SUCCEEDED(res) && objAccess)  {     if (objAccess->MimeObjectWrite(mimeObject, data, length, user_visible_p) == NS_OK)      rc = length;    else      rc = -1;  }   return rc;}