Move to REF_DEBUG, for consistency.
[openssl.git] / crypto / asn1 / tasn_utl.c
index 10cc1f9143a13553eb399e85f0c44516f34caee0..51f22aa7c6fa502faaf710efa0db782b452cf749 100644 (file)
@@ -1,4 +1,3 @@
-/* tasn_utl.c */
 /*
  * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
  * 2000.
@@ -119,12 +118,9 @@ int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it)
     }
     ret = CRYPTO_add(lck, op, aux->ref_lock);
 #ifdef REF_PRINT
-    fprintf(stderr, "%s: Reference Count: %d\n", it->sname, *lck);
-#endif
-#ifdef REF_CHECK
-    if (ret < 0)
-        fprintf(stderr, "%s, bad reference count\n", it->sname);
+    fprintf(stderr, "%p:%4d:%s\n", it, *lck, it->sname);
 #endif
+    REF_ASSERT_ISNT(ret < 0);
     return ret;
 }