dbg_PrintHash(): #ifdef DEBUG everything related to pure verbose debugging.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 26 May 2012 13:32:11 +0000 (15:32 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 26 May 2012 13:32:11 +0000 (15:32 +0200)
libcitadel/lib/hash.c

index d4c2f5080f408b516c47ab98d800f5618beff19c..e49adb80ab55b8fb500aaf6016a52251717f3a2c 100644 (file)
@@ -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);