diff options
author | Rich Salz <rsalz@openssl.org> | 2016-05-20 10:46:29 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-05-20 10:48:29 -0400 |
commit | 739a1eb1961cdc3b1597a040766f3cb359d095f6 (patch) | |
tree | da90e8dd33e1aa605351b529713901bb1b0f37b8 /crypto/lhash/lh_stats.c | |
parent | 06593767b21d4ebacc3e6ecc8daedd9d5c5f9f97 (diff) |
Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxx
Rename sk_xxx to OPENSSL_sk_xxx and _STACK to OPENSSL_STACK
Rename lh_xxx API to OPENSSL_LH_xxx and LHASH_NODE to OPENSSL_LH_NODE
Make lhash stuff opaque.
Use typedefs for function pointers; makes the code simpler.
Remove CHECKED_xxx macros.
Add documentation; remove old X509-oriented doc.
Add API-compat names for entire old API
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/lhash/lh_stats.c')
-rw-r--r-- | crypto/lhash/lh_stats.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/crypto/lhash/lh_stats.c b/crypto/lhash/lh_stats.c index 0644c756e8..7337832422 100644 --- a/crypto/lhash/lh_stats.c +++ b/crypto/lhash/lh_stats.c @@ -18,50 +18,48 @@ #include <openssl/bio.h> #include <openssl/lhash.h> +#include "lhash_lcl.h" # ifndef OPENSSL_NO_STDIO -void lh_stats(const _LHASH *lh, FILE *fp) +void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp) { BIO *bp; bp = BIO_new(BIO_s_file()); if (bp == NULL) - goto end; + return; BIO_set_fp(bp, fp, BIO_NOCLOSE); - lh_stats_bio(lh, bp); + OPENSSL_LH_stats_bio(lh, bp); BIO_free(bp); - end:; } -void lh_node_stats(const _LHASH *lh, FILE *fp) +void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp) { BIO *bp; bp = BIO_new(BIO_s_file()); if (bp == NULL) - goto end; + return; BIO_set_fp(bp, fp, BIO_NOCLOSE); - lh_node_stats_bio(lh, bp); + OPENSSL_LH_node_stats_bio(lh, bp); BIO_free(bp); - end:; } -void lh_node_usage_stats(const _LHASH *lh, FILE *fp) +void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp) { BIO *bp; bp = BIO_new(BIO_s_file()); if (bp == NULL) - goto end; + return; BIO_set_fp(bp, fp, BIO_NOCLOSE); - lh_node_usage_stats_bio(lh, bp); + OPENSSL_LH_node_usage_stats_bio(lh, bp); BIO_free(bp); - end:; } # endif -void lh_stats_bio(const _LHASH *lh, BIO *out) +void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out) { BIO_printf(out, "num_items = %lu\n", lh->num_items); BIO_printf(out, "num_nodes = %u\n", lh->num_nodes); @@ -82,9 +80,9 @@ void lh_stats_bio(const _LHASH *lh, BIO *out) BIO_printf(out, "num_hash_comps = %lu\n", lh->num_hash_comps); } -void lh_node_stats_bio(const _LHASH *lh, BIO *out) +void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out) { - LHASH_NODE *n; + OPENSSL_LH_NODE *n; unsigned int i, num; for (i = 0; i < lh->num_nodes; i++) { @@ -94,9 +92,9 @@ void lh_node_stats_bio(const _LHASH *lh, BIO *out) } } -void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out) +void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out) { - LHASH_NODE *n; + OPENSSL_LH_NODE *n; unsigned long num; unsigned int i; unsigned long total = 0, n_used = 0; |