if (NS_FAILED(rv) || pPref == nsnull)
if (NS_FAILED(rv) || !pPref)
nsresult DIR_SaveServerPreferences (nsVoidArray *wholeList){	if (wholeList)	{		nsresult rv = NS_OK;		NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv); 		if (NS_FAILED(rv) || pPref == nsnull) 			return NS_ERROR_FAILURE;		PRInt32  i;		PRInt32  count = wholeList->Count();		DIR_Server *server;		for (i = 0; i < count; i++)		{			server = (DIR_Server *) wholeList->ElementAt(i);			if (server)				DIR_SavePrefsForOneServer(server);		}		pPref->SetIntPref(PREF_LDAP_GLOBAL_TREE_NAME".user_id", dir_UserId);	}	return NS_OK;}