Use _hx509_abort.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16436 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-01-03 08:26:26 +00:00
parent fde07b8b17
commit 02d27ea231
6 changed files with 31 additions and 16 deletions

View File

@@ -69,7 +69,23 @@ typedef struct hx509_name_constraints {
#define GeneralSubtrees_SET(g,var) \
(g)->len = (var)->len, (g)->val = (var)->val;
/*
*
*/
void
_hx509_abort(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
abort();
}
/*
*
*/
Certificate *
_hx509_get_cert(hx509_cert cert)
@@ -145,7 +161,7 @@ hx509_cert_free(hx509_cert cert)
int i;
if (cert->ref <= 0)
abort();
_hx509_abort("refcount <= 0");
if (--cert->ref > 0)
return;
free_Certificate(cert->data);
@@ -166,10 +182,10 @@ hx509_cert
hx509_cert_ref(hx509_cert cert)
{
if (cert->ref <= 0)
abort();
_hx509_abort("refcount <= 0");
cert->ref++;
if (cert->ref == 0)
abort();
_hx509_abort("refcount == 0");
return cert;
}