From 222345170f781b0cc19dfb99e0820098097a1254 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 9 Jul 2014 18:14:39 +0200 Subject: Corrected compile errors in case DB_ENABLE_STATS is defined Signed-off-by: Haru --- src/common/db.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common/db.c') diff --git a/src/common/db.c b/src/common/db.c index 11ac06c93..79e55023f 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -330,7 +330,7 @@ static struct db_stats { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -#define DB_COUNTSTAT(token) do { if (stats. ## token != UINT32_MAX) ++stats. ## token ; } while(0) +#define DB_COUNTSTAT(token) do { if ((stats.token) != UINT32_MAX) ++(stats.token); } while(0) #else /* !defined(DB_ENABLE_STATS) */ #define DB_COUNTSTAT(token) #endif /* !defined(DB_ENABLE_STATS) */ @@ -2780,15 +2780,15 @@ void db_final(void) "DB_INT : allocated %10u, destroyed %10u\n" "DB_UINT : allocated %10u, destroyed %10u\n" "DB_STRING : allocated %10u, destroyed %10u\n" - "DB_ISTRING : allocated %10u, destroyed %10u\n", + "DB_ISTRING : allocated %10u, destroyed %10u\n" "DB_INT64 : allocated %10u, destroyed %10u\n" - "DB_UINT64 : allocated %10u, destroyed %10u\n" + "DB_UINT64 : allocated %10u, destroyed %10u\n", stats.db_int_alloc, stats.db_int_destroy, stats.db_uint_alloc, stats.db_uint_destroy, stats.db_string_alloc, stats.db_string_destroy, stats.db_istring_alloc, stats.db_istring_destroy, stats.db_int64_alloc, stats.db_int64_destroy, - stats.db_uint64_alloc, stats.db_uint64_destroy,); + stats.db_uint64_alloc, stats.db_uint64_destroy); ShowInfo(CL_WHITE"Database function counters"CL_RESET":\n" "db_rotate_left %10u, db_rotate_right %10u,\n" "db_rebalance %10u, db_rebalance_erase %10u,\n" -- cgit v1.2.3-70-g09d2