void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el)
{
	ptrdiff_t n = (el - msg->elements);
	if (n >= msg->num_elements || n < 0) {
		/* the element is not in the list. the caller is crazy. */
		return;
	}
	msg->num_elements--;
	if (n != msg->num_elements) {
		memmove(el, el+1, (msg->num_elements - n)*sizeof(*el));
	}
}
void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el)
{
	ptrdiff_t n = (el - msg->elements);
	if (n >= msg->num_elements || n < 0) {
		 
		return;
	}
	msg->num_elements--;
	if (n != msg->num_elements) {
		memmove(el, el+1, (msg->num_elements - n)*sizeof(*el));
	}
}