diff --git a/src/dict.c b/src/dict.c index 00ac118089..ab6afa1feb 100644 --- a/src/dict.c +++ b/src/dict.c @@ -99,7 +99,8 @@ static_assert(offsetof(embeddedDictEntry, v) == 0, "unexpected field offset"); static_assert(offsetof(embeddedDictEntry, next) == sizeof(void *), "unexpected field offset"); static_assert(offsetof(embeddedDictEntry, key_header_size) == 2 * sizeof(void *), "unexpected field offset"); /* key_buf is located after two pointers `v.val`, `next` and uint8_t field `key_header_size` */ -static_assert(offsetof(embeddedDictEntry, key_buf) == (2 * sizeof(void *)) + sizeof(uint8_t), "unexpected field offset"); +static_assert(offsetof(embeddedDictEntry, key_buf) == (2 * sizeof(void *)) + sizeof(uint8_t), + "unexpected field offset"); /* The minimum amount of bytes required for embedded dict entry. */ static inline size_t compactSizeEmbeddedDictEntry(void) { diff --git a/src/server.c b/src/server.c index 7caf184ebe..a68cc1a0e7 100644 --- a/src/server.c +++ b/src/server.c @@ -468,16 +468,14 @@ dictType zsetDictType = { }; /* Db->dict, keys are sds strings, vals are Objects. */ -dictType dbDictType = { - dictSdsHash, /* hash function */ - NULL, /* key dup */ - dictSdsKeyCompare, /* key compare */ - NULL, /* key is embedded in the dictEntry and freed internally */ - dictObjectDestructor, /* val destructor */ - dictResizeAllowed, /* allow to resize */ - .embedKey = dictSdsEmbedKey, - .embedded_entry = 1 -}; +dictType dbDictType = {dictSdsHash, /* hash function */ + NULL, /* key dup */ + dictSdsKeyCompare, /* key compare */ + NULL, /* key is embedded in the dictEntry and freed internally */ + dictObjectDestructor, /* val destructor */ + dictResizeAllowed, /* allow to resize */ + .embedKey = dictSdsEmbedKey, + .embedded_entry = 1}; /* Db->expires */ dictType dbExpiresDictType = {