FreeBSD/contrib/ntp/libntp/libssl_compat.c
/* --------------------------------------------------------------------
 * replace a BIGNUM owned by the caller with another one if it's not
 * NULL, taking over the ownership of the new value. This clears & frees
 * the old value -- the clear might be overkill, but it's better to err
 * on the side of paranoia here.
 */
replace a BIGNUM owned by the caller with another one if it's not
NULL, taking over the ownership of the new value. This clears & frees
the old value -- the clear might be overkill, but it's better to err
on the side of paranoia here.
replace a BIGNUM owned by the caller with another one if it ' s not NULL taking over the ownership of the new value . This clears & frees the old value -- the clear might be overkill but it ' s better to err on the side of paranoia here .
static void
replace_bn_nn(
	BIGNUM **	ps,
	BIGNUM *	n
	)
{
	if (n) {
		REQUIRE(*ps != n);
		BN_clear_free(*ps);
		*ps = n;
	}
}
static void replace_bn_nn ( BIGNUM * * ps , BIGNUM * n ) { if ( n ) { REQUIRE ( * ps != n ) ; BN_clear_free ( * ps ) ; * ps = n ; } }
replace a BIGNUM owned by the caller with another one if it's not
 NULL, taking over the ownership of the new value.
replace a BIGNUM owned by the caller with another one if it ' s not NULL taking over the ownership of the new value .