Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed May 11, 2024
1 parent 1fa4e34 commit a250aea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -737,12 +737,10 @@ class SipHash {
void finish(u8 *out);

private:
u64 k0, k1;
u64 v0, v1, v2, v3;

i64 total_bytes = 0;
u8 buf[8];
i64 buflen = 0;
i64 total_bytes = 0;
};

//
Expand Down
4 changes: 2 additions & 2 deletions common/siphash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace mold {
#define D_ROUND for (i64 i = 0; i < 3; i++) ROUND

SipHash::SipHash(u8 *key) {
k0 = *(ul64 *)key;
k1 = *(ul64 *)(key + 8);
u64 k0 = *(ul64 *)key;
u64 k1 = *(ul64 *)(key + 8);
v0 = 0x736f6d6570736575 ^ k0;
v1 = 0x646f72616e646f6d ^ k1 ^ 0xee;
v2 = 0x6c7967656e657261 ^ k0;
Expand Down

0 comments on commit a250aea

Please sign in to comment.