diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-27 11:43:33 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-30 11:40:53 +0200 |
commit | 55825de59b1c85425873ca8ee7e7374944a16ca1 (patch) | |
tree | f3eb2a4eb5e751aaf06651db94672c67c0a497df | |
parent | 3aff6c79170717478ba89bb1a3b8bb2063adc735 (diff) | |
download | systemd-55825de59b1c85425873ca8ee7e7374944a16ca1.tar.gz |
basic/hashmap: drop unneeded macro
-rw-r--r-- | src/basic/hashmap.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index bbb7546093..0edaab7bd8 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -145,12 +145,7 @@ struct hashmap_debug_info { /* Tracks all existing hashmaps. Get at it from gdb. See sd_dump_hashmaps.py */ static LIST_HEAD(struct hashmap_debug_info, hashmap_debug_list); static pthread_mutex_t hashmap_debug_list_mutex = PTHREAD_MUTEX_INITIALIZER; - -#define HASHMAP_DEBUG_FIELDS struct hashmap_debug_info debug; - -#else /* !ENABLE_DEBUG_HASHMAP */ -#define HASHMAP_DEBUG_FIELDS -#endif /* ENABLE_DEBUG_HASHMAP */ +#endif enum HashmapType { HASHMAP_TYPE_PLAIN, @@ -212,7 +207,10 @@ struct HashmapBase { bool from_pool:1; /* whether was allocated from mempool */ bool dirty:1; /* whether dirtied since last iterated_cache_get() */ bool cached:1; /* whether this hashmap is being cached */ - HASHMAP_DEBUG_FIELDS /* optional hashmap_debug_info */ + +#if ENABLE_DEBUG_HASHMAP + struct hashmap_debug_info debug; +#endif }; /* Specific hash types |