Commit c9ef0f52 authored by Nils Goroll's avatar Nils Goroll

fix a leftover from vslp times - overlooked increment by one for crc32

noticed after varnish core merge
parent 26b23cee
Pipeline #27 skipped
...@@ -56,12 +56,7 @@ vle32enc(void *pp, uint32_t u) ...@@ -56,12 +56,7 @@ vle32enc(void *pp, uint32_t u)
static uint32_t __match_proto__(hash_func) static uint32_t __match_proto__(hash_func)
shard_hash_crc32(VCL_STRING s) shard_hash_crc32(VCL_STRING s)
{ {
uint32_t crc; return (crc32_l(s, strlen(s)));
crc = crc32(~0U, (const unsigned char*)s, strlen(s));
crc ^= ~0U;
crc++;
return (crc);
} }
static uint32_t __match_proto__(hash_func) static uint32_t __match_proto__(hash_func)
......
...@@ -136,9 +136,9 @@ logexpect l1 -v v1 -g raw -d 1 { ...@@ -136,9 +136,9 @@ logexpect l1 -v v1 -g raw -d 1 {
expect 0 = CLI Loaded expect 0 = CLI Loaded
expect * = Debug {^shard: lookup key 68b902f8 idx 29 host 0} expect * = Debug {^shard: lookup key 68b902f7 idx 29 host 0}
expect * = Debug {^shard: lookup key 39dc4614 idx 20 host 1} expect * = Debug {^shard: lookup key 39dc4613 idx 20 host 1}
expect * = Debug {^shard: lookup key c7793506 idx 59 host 2} expect * = Debug {^shard: lookup key c7793505 idx 59 host 2}
} -start } -start
client c1 { client c1 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment