for (i=0; i < entry->nemailAddrs; i++) { DeleteDBSMimeEntry(cert->dbhandle, entry->emailAddrs[i]);
for (j=0; j < entry->nemailAddrs; j++) { DeleteDBSMimeEntry(cert->dbhandle, entry->emailAddrs[j]);
RemovePermSubjectNode(NSSLOWCERTCertificate *cert){    certDBEntrySubject *entry;    unsigned int i;    SECStatus rv;        entry = ReadDBSubjectEntry(cert->dbhandle,&cert->derSubject);    if ( entry == NULL ) {	return(SECFailure);    }    PORT_Assert(entry->ncerts);    rv = SECFailure;        if ( entry->ncerts > 1 ) {	for ( i = 0; i < entry->ncerts; i++ ) {	    if ( SECITEM_CompareItem(&entry->certKeys[i], &cert->certKey) ==		SECEqual ) {		/* copy rest of list forward one entry */		for ( i = i + 1; i < entry->ncerts; i++ ) {		    entry->certKeys[i-1] = entry->certKeys[i];		    entry->keyIDs[i-1] = entry->keyIDs[i];		}		entry->ncerts--;		DeleteDBSubjectEntry(cert->dbhandle, &cert->derSubject);		rv = WriteDBSubjectEntry(cert->dbhandle, entry);		break;	    }	}    } else {	/* no entries left, delete the perm entry in the DB */	if ( entry->emailAddrs ) {	    /* if the subject had an email record, then delete it too */	    for (i=0; i < entry->nemailAddrs; i++) {		DeleteDBSMimeEntry(cert->dbhandle, entry->emailAddrs[i]);	    }	}	if ( entry->nickname ) {	    DeleteDBNicknameEntry(cert->dbhandle, entry->nickname);	}		DeleteDBSubjectEntry(cert->dbhandle, &cert->derSubject);    }    DestroyDBEntry((certDBEntry *)entry);    return(rv);}