mirror of
https://github.com/systemd/systemd.git
synced 2026-07-24 16:25:52 +00:00
journal: rename hash64() to jenkins_hash64()
Let's prefix this with "jenkins_" since it wraps the jenkins hash. We want to add support for other hash functions to journald soon, hence better be clear with what this is. In particular as all other symbols defined by lookup3.h actually are prefixed "jenkins_".
This commit is contained in:
@@ -1344,7 +1344,7 @@ int journal_file_find_field_object(
|
||||
assert(f);
|
||||
assert(field && size > 0);
|
||||
|
||||
hash = hash64(field, size);
|
||||
hash = jenkins_hash64(field, size);
|
||||
|
||||
return journal_file_find_field_object_with_hash(
|
||||
f,
|
||||
@@ -1451,7 +1451,7 @@ int journal_file_find_data_object(
|
||||
assert(f);
|
||||
assert(data || size == 0);
|
||||
|
||||
hash = hash64(data, size);
|
||||
hash = jenkins_hash64(data, size);
|
||||
|
||||
return journal_file_find_data_object_with_hash(
|
||||
f,
|
||||
@@ -1472,7 +1472,7 @@ static int journal_file_append_field(
|
||||
assert(f);
|
||||
assert(field && size > 0);
|
||||
|
||||
hash = hash64(field, size);
|
||||
hash = jenkins_hash64(field, size);
|
||||
|
||||
r = journal_file_find_field_object_with_hash(f, field, size, hash, &o, &p);
|
||||
if (r < 0)
|
||||
@@ -1535,7 +1535,7 @@ static int journal_file_append_data(
|
||||
assert(f);
|
||||
assert(data || size == 0);
|
||||
|
||||
hash = hash64(data, size);
|
||||
hash = jenkins_hash64(data, size);
|
||||
|
||||
r = journal_file_find_data_object_with_hash(f, data, size, hash, &o, &p);
|
||||
if (r < 0)
|
||||
|
||||
@@ -163,9 +163,9 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
|
||||
return r;
|
||||
}
|
||||
|
||||
h2 = hash64(b, b_size);
|
||||
h2 = jenkins_hash64(b, b_size);
|
||||
} else
|
||||
h2 = hash64(o->data.payload, le64toh(o->object.size) - offsetof(Object, data.payload));
|
||||
h2 = jenkins_hash64(o->data.payload, le64toh(o->object.size) - offsetof(Object, data.payload));
|
||||
|
||||
if (h1 != h2) {
|
||||
error(offset, "Invalid hash (%08"PRIx64" vs. %08"PRIx64, h1, h2);
|
||||
|
||||
@@ -13,7 +13,7 @@ void jenkins_hashlittle2(const void *key, size_t length, uint32_t *pc, uint32_t
|
||||
|
||||
uint32_t jenkins_hashbig(const void *key, size_t length, uint32_t initval) _pure_;
|
||||
|
||||
static inline uint64_t hash64(const void *data, size_t length) {
|
||||
static inline uint64_t jenkins_hash64(const void *data, size_t length) {
|
||||
uint32_t a = 0, b = 0;
|
||||
|
||||
jenkins_hashlittle2(data, length, &a, &b);
|
||||
|
||||
@@ -279,7 +279,7 @@ _public_ int sd_journal_add_match(sd_journal *j, const void *data, size_t size)
|
||||
assert(j->level1->type == MATCH_OR_TERM);
|
||||
assert(j->level2->type == MATCH_AND_TERM);
|
||||
|
||||
hash = hash64(data, size);
|
||||
hash = jenkins_hash64(data, size);
|
||||
|
||||
LIST_FOREACH(matches, l3, j->level2->matches) {
|
||||
assert(l3->type == MATCH_OR_TERM);
|
||||
|
||||
Reference in New Issue
Block a user