((X509_NAME_ENTRY *)sk_value(sk,loc-1))->set-=j; }
((X509_NAME_ENTRY *)sk_value(sk,i))->set--;
X509_NAME_ENTRY *X509_NAME_delete_entry(name,loc)X509_NAME *name;int loc;	{	X509_NAME_ENTRY *ret;	int i,j,n,set_prev,set_next;	STACK *sk;	if ((name == NULL) || (sk_num(name->entries) <= loc) || (loc < 0))		return(NULL);	sk=name->entries;	ret=(X509_NAME_ENTRY *)sk_delete(sk,loc);	n=sk_num(sk);	name->modified=1;	if (loc == n) return(ret);	/* else we need to fixup the set field */	if (loc != 0)		set_prev=((X509_NAME_ENTRY *)sk_value(sk,loc-1))->set;	else		set_prev=ret->set-1;	set_next=((X509_NAME_ENTRY *)sk_value(sk,loc))->set;	/* set_prev is the previous set	 * set is the current set	 * set_next is the following	 * prev  1 1	1 1	1 1	1 1	 * set   1	1	2	2	 * next  1 1	2 2	2 2	3 2	 * so basically only if prev and next differ by 2, then	 * re-number down by 1 */	if (set_prev+1 < set_next)		{		j=set_next-set_prev-1;		for (i=loc; i<n; i++)			((X509_NAME_ENTRY *)sk_value(sk,loc-1))->set-=j;		}	return(ret);	}