>From bfd3bd8decd1a7718e5245db9cd12db6dbc3f25b Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 4 Feb 2014 13:37:22 +0100 Subject: [PATCH 6/7] DHASH: Use ifdef for testing DEBUG macro "#ifdef DEBUG" was used 5 times and "#if DEBUG" was used 2 times. This patch unifies usage. --- dhash/dhash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dhash/dhash.c b/dhash/dhash.c index a9b4f647c638484a981adb8efd4da9020785d7c6..45ee0cfe6e883fc7297198798447fb05144750ed 100644 --- a/dhash/dhash.c +++ b/dhash/dhash.c @@ -155,7 +155,7 @@ static hash_entry_t *hash_iter_next(struct hash_iter_context_t *iter); /************************* Internal Global Variables ***********************/ /*****************************************************************************/ -#if DEBUG +#ifdef DEBUG int debug_level = 1; #endif @@ -620,7 +620,7 @@ int hash_create_ex(unsigned long count, hash_table_t **tbl, table->min_load_factor = min_load_factor == 0 ? HASH_DEFAULT_MIN_LOAD_FACTOR : min_load_factor; table->max_load_factor = max_load_factor == 0 ? HASH_DEFAULT_MAX_LOAD_FACTOR : max_load_factor; -#if DEBUG +#ifdef DEBUG if (debug_level >= 1) { fprintf(stderr, "hash_create_ex: count=%lu available buckets=%lu bucket_count=%lu maxp=%lu\n", count, table->directory_size*table->segment_size, table->bucket_count, table->maxp); -- 1.8.5.3