Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
Signed-off-by: Harkrishn Patro <[email protected]>
  • Loading branch information
hpatro committed Jun 27, 2024
1 parent d9d1cd3 commit 32cafc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 8 additions & 10 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 32cafc6

Please sign in to comment.