summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-07-09 18:14:39 +0200
committerHaru <haru@dotalux.com>2014-07-09 18:14:39 +0200
commit222345170f781b0cc19dfb99e0820098097a1254 (patch)
treee8a0aba0edaa01eb14c71e4ef1f7d8bfd8ff4d40 /src
parent8a1ad0673904557bc6572df0abecb25f2129df1b (diff)
downloadhercules-222345170f781b0cc19dfb99e0820098097a1254.tar.gz
hercules-222345170f781b0cc19dfb99e0820098097a1254.tar.bz2
hercules-222345170f781b0cc19dfb99e0820098097a1254.tar.xz
hercules-222345170f781b0cc19dfb99e0820098097a1254.zip
Corrected compile errors in case DB_ENABLE_STATS is defined
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r--src/common/db.c8
1 files changed, 4 insertions, 4 deletions
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"