From: Wilfried Goesgens Date: Sat, 26 May 2012 13:32:11 +0000 (+0200) Subject: dbg_PrintHash(): #ifdef DEBUG everything related to pure verbose debugging. X-Git-Tag: v8.12~52 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=5228169c879f1da665d7c9595f61af228156d241 dbg_PrintHash(): #ifdef DEBUG everything related to pure verbose debugging. --- 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);