if (!nssSlot_IsTokenPresent(slot)) {   nssSlot_Destroy(slot); return PR_FALSE; }
search_for_objects (  nssTokenObjectCache *cache){    PRBool doSearch = PR_FALSE;    NSSSlot *slot = nssToken_GetSlot(cache->token);    if (!nssSlot_IsTokenPresent(slot)) {	/* The token is no longer present, destroy any cached objects */	/* clear_cache(cache); */	nssSlot_Destroy(slot);	return PR_FALSE;    }    /* Handle non-friendly slots (slots which require login for objects) */    if (!nssSlot_IsFriendly(slot)) {	if (nssSlot_IsLoggedIn(slot)) {	    /* Either no state change, or went from !logged in -> logged in */	    cache->loggedIn = PR_TRUE;	    doSearch = PR_TRUE;	} else {	    if (cache->loggedIn) {		/* went from logged in -> !logged in, destroy cached objects */		clear_cache(cache);		cache->loggedIn = PR_FALSE;	    } /* else no state change, still not logged in, so exit */	}    } else {	/* slot is friendly, thus always available for search */	doSearch = PR_TRUE;    }    nssSlot_Destroy(slot);    return doSearch;}