pref->defaultPref.boolVal = (PRBool) -2;
pref->defaultPref.boolVal = (PRBool) BOGUS_DEFAULT_BOOL_PREF_VALUE;
PrefResult pref_HashPref(const char *key, PrefValue value, PrefType type, PrefAction action){	PrefNode* pref;	PrefResult result = PREF_OK;	if (!gHashTable && !pref_useDefaultPrefFile())		return PREF_NOT_INITIALIZED;	pref = (PrefNode*) PR_HashTableLookup(gHashTable, key);	if (!pref)	{    	pref = (PrefNode*) calloc(sizeof(PrefNode), 1);    	if (!pref)	    		return PREF_OUT_OF_MEMORY;    	pref->flags = type;		if (pref->flags & PREF_BOOL)			pref->defaultPref.boolVal = (PRBool) -2;		/* ugly hack -- define it to a default that no pref will ever default to		   this should really get fixed right by some out of band data */		if (pref->flags & PREF_INT)			pref->defaultPref.intVal = (PRInt32) -5632;    	PR_HashTableAdd(gHashTable, PL_strdup(key), pref);    }    else if ((((PrefType)(pref->flags)) & PREF_VALUETYPE_MASK) != (type & PREF_VALUETYPE_MASK))    {      /*PR_ASSERT(0);*/			/* this shouldn't happen */      /* NS_ASSERTION(0, "Trying to set pref to with the wrong type!"); */		return PREF_TYPE_CHANGE_ERR;    }        switch (action)    {    	case PREF_SETDEFAULT:    	case PREF_SETCONFIG:    		if (!PREF_IS_LOCKED(pref))    		{		/* ?? change of semantics? */				if (pref_ValueChanged(pref->defaultPref, value, type))				{					pref_SetValue(&pref->defaultPref, value, type);					if (!PREF_HAS_USER_VALUE(pref))				    	result = PREF_VALUECHANGED;			    }			}			if (action == PREF_SETCONFIG)				pref->flags |= PREF_CONFIG;			break;		/* LI_STUFF  turn the li stuff on */		case PREF_SETLI:			if ( !PREF_HAS_LI_VALUE(pref) ||					pref_ValueChanged(pref->userPref, value, type) )			{    					pref_SetValue(&pref->userPref, value, type);				pref->flags |= PREF_LILOCAL;				if (!PREF_IS_LOCKED(pref))			    	result = PREF_VALUECHANGED;		    }			break;					case PREF_SETUSER:			/* If setting to the default value, then un-set the user value.			   Otherwise, set the user value only if it has changed */			if ( !pref_ValueChanged(pref->defaultPref, value, type) )			{				if (PREF_HAS_USER_VALUE(pref))				{					pref->flags &= ~PREF_USERSET;					if (!PREF_IS_LOCKED(pref))						result = PREF_VALUECHANGED;				}			}			else if ( !PREF_HAS_USER_VALUE(pref) ||					   pref_ValueChanged(pref->userPref, value, type) )			{    					pref_SetValue(&pref->userPref, value, type);				pref->flags |= PREF_USERSET;				if (!PREF_IS_LOCKED(pref))			    	result = PREF_VALUECHANGED;		    }			break;					case PREF_LOCK:			if (pref_ValueChanged(pref->defaultPref, value, type))			{				pref_SetValue(&pref->defaultPref, value, type);		    	result = PREF_VALUECHANGED;		    }		    else if (!PREF_IS_LOCKED(pref))		    {		    	result = PREF_VALUECHANGED;		    }		    pref->flags |= PREF_LOCKED;		    gIsAnyPrefLocked = PR_TRUE;		    break;	}    if (result == PREF_VALUECHANGED && gCallbacksEnabled)    {    	PrefResult result2 = pref_DoCallback(key);    	if (result2 < 0)    		result = result2;    }    return result;}