Skip to content

Commit

Permalink
Clang-format
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Söderqvist <[email protected]>
  • Loading branch information
zuiderkwast committed Sep 11, 2024
1 parent 8dcf107 commit ff18524
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ robj *createObject(int type, void *ptr) {
o->ptr = ptr;
o->refcount = 1;
o->lru = 0;
o->hasexpire = 1; /* There's an expire field. */
o->hasembkey = 0; /* No embedded actual key contents. */
o->hasembkeyptr = 1; /* There's an embedded key pointer field. */
o->hasexpire = 1; /* There's an expire field. */
o->hasembkey = 0; /* No embedded actual key contents. */
o->hasembkeyptr = 1; /* There's an embedded key pointer field. */
unsigned char *data = (void *)(o + 1);
long long expire = -1; /* -1 means no expire */
memcpy(data, &expire, sizeof(expire)); /* expire = -1 */
long long expire = -1; /* -1 means no expire */
memcpy(data, &expire, sizeof(expire)); /* expire = -1 */
memset(data + sizeof(expire), 0, sizeof(void *)); /* embkeyptr = NULL */
return o;
}
Expand Down

0 comments on commit ff18524

Please sign in to comment.