From 5228169c879f1da665d7c9595f61af228156d241 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 26 May 2012 15:32:11 +0200 Subject: [PATCH] dbg_PrintHash(): #ifdef DEBUG everything related to pure verbose debugging. --- libcitadel/lib/hash.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c index d4c2f5080..e49adb80a 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -173,9 +173,11 @@ int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry */ int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Second) { +#ifdef DEBUG const char *foo; const char *bar; const char *bla = ""; +#endif long key; long i; @@ -193,8 +195,11 @@ int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Secon if (Hash->LookupTable[i] == NULL) { +#ifdef DEBUG foo = ""; bar = ""; +#endif + key = 0; } else @@ -202,13 +207,26 @@ int dbg_PrintHash(HashList *Hash, PrintHashContent First, PrintHashContent Secon key = Hash->LookupTable[i]->Key; foo = Hash->LookupTable[i]->HashKey; if (First != NULL) - bar = First(Hash->Members[Hash->LookupTable[i]->Position]->Data); +#ifdef DEBUG + bar = +#endif + First(Hash->Members[Hash->LookupTable[i]->Position]->Data); +#ifdef DEBUG else bar = ""; +#endif + if (Second != NULL) - bla = Second(Hash->Members[Hash->LookupTable[i]->Position]->Data); +#ifdef DEBUG + bla = +#endif + Second(Hash->Members[Hash->LookupTable[i]->Position]->Data); +#ifdef DEBUG + else bla = ""; +#endif + } #ifdef DEBUG printf (" ---- Hashkey[%ld][%ld]: '%s' Value: '%s' ; %s\n", i, key, foo, bar, bla); -- 2.30.2