From a73baf4e50fd8468f726179d89ba90364c5b8329 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Wed, 23 Oct 2019 22:38:59 +0300 Subject: dict: use the free_pair's key presence or NULL as a sign of use. Instead of using a boolean parameter, we can use the key variable. If it's NULL, the pair is not used and can be used. Otherwise, it's in use - don't use. It saves this annoying boolean, which causes the compiler (or us explicitly) to pad with additional bytes the dict struct. Change-Id: I89f52db57f35b3ef8acf57b7de2cee37f5d18e06 updates: bz#1193929 Signed-off-by: Yaniv Kaul --- libglusterfs/src/glusterfs/dict.h | 1 - 1 file changed, 1 deletion(-) (limited to 'libglusterfs/src/glusterfs') diff --git a/libglusterfs/src/glusterfs/dict.h b/libglusterfs/src/glusterfs/dict.h index bfb01afb9b9..8fc4b7ebbd9 100644 --- a/libglusterfs/src/glusterfs/dict.h +++ b/libglusterfs/src/glusterfs/dict.h @@ -123,7 +123,6 @@ struct _dict { gf_lock_t lock; data_pair_t *members_internal; data_pair_t free_pair; - gf_boolean_t free_pair_in_use; }; typedef gf_boolean_t (*dict_match_t)(dict_t *d, char *k, data_t *v, void *data); -- cgit