X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Fsummary.c;h=182738c41f59129e53a59da2c881d8badd703198;hb=50b15fbd060dcf6da9cbc44b8dadc74c3665721c;hp=56d365883030dce6e85961022c7ac3d7f7e694aa;hpb=2491b65a6d10cd6ca1a3e05bf535eb0180047922;p=ccan diff --git a/ccan/tdb2/summary.c b/ccan/tdb2/summary.c index 56d36588..182738c4 100644 --- a/ccan/tdb2/summary.c +++ b/ccan/tdb2/summary.c @@ -1,7 +1,7 @@ - /* + /* Trivial Database 2: human-readable summary code Copyright (C) Rusty Russell 2010 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -38,7 +38,7 @@ static int count_hash(struct tdb_context *tdb, static bool summarize(struct tdb_context *tdb, struct tally *hashes, struct tally *ftables, - struct tally *free, + struct tally *fr, struct tally *keys, struct tally *data, struct tally *extra, @@ -69,7 +69,7 @@ static bool summarize(struct tdb_context *tdb, len = sizeof(p->r) + p->r.max_len; } else if (frec_magic(&p->f) == TDB_FREE_MAGIC) { len = frec_len(&p->f); - tally_add(free, len); + tally_add(fr, len); tally_add(buckets, size_to_bucket(len)); len += sizeof(p->u); unc++; @@ -175,7 +175,7 @@ char *tdb_summary(struct tdb_context *tdb, enum tdb_summary_flags flags) chains = tally_new(HISTO_HEIGHT); if (!ftables || !hashes || !freet || !keys || !data || !extra || !uncoal || !buckets || !chains) { - tdb_logerr(tdb, TDB_ERR_OOM, TDB_DEBUG_ERROR, + tdb_logerr(tdb, TDB_ERR_OOM, TDB_LOG_ERROR, "tdb_summary: failed to allocate tally structures"); goto unlock; }