diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-10-23 22:38:59 +0300 |
---|---|---|
committer | Xavi Hernandez <xhernandez@redhat.com> | 2020-01-13 10:02:00 +0000 |
commit | a73baf4e50fd8468f726179d89ba90364c5b8329 (patch) | |
tree | 09e94182b1343a999fd068bb3ff3f1bdbe87feff /libglusterfs/src/glusterfs | |
parent | 905db496aa622e421d807222dcc488488da9dbfe (diff) |
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 <ykaul@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs')
-rw-r--r-- | libglusterfs/src/glusterfs/dict.h | 1 |
1 files changed, 0 insertions, 1 deletions
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); |