projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa1e8c2
)
Fix incorrect return type
author
John Naylor
<
[email protected]
>
Sat, 6 Apr 2024 05:02:45 +0000
(12:02 +0700)
committer
John Naylor
<
[email protected]
>
Sat, 6 Apr 2024 05:20:40 +0000
(12:20 +0700)
fasthash32() calculates a 32-bit hashcode, but the return
type was uint64. Change to uint32.
Noted by Jeff Davis
Discussion: https://postgr.es/m/
b16c93e6c736a422d4de668343515375664eb05d
.camel%40j-davis.com
src/include/common/hashfn_unstable.h
patch
|
blob
|
blame
|
history
diff --git
a/src/include/common/hashfn_unstable.h
b/src/include/common/hashfn_unstable.h
index 791750d136c48b4818a1c3f41b4681fa52b45b14..1c782179cd680526cec04d478268a535e01dd3cb 100644
(file)
--- a/
src/include/common/hashfn_unstable.h
+++ b/
src/include/common/hashfn_unstable.h
@@
-361,7
+361,7
@@
fasthash64(const char *k, size_t len, uint64 seed)
}
/* like fasthash64, but returns a 32-bit hashcode */
-static inline uint
64
+static inline uint
32
fasthash32(const char *k, size_t len, uint64 seed)
{
return fasthash_reduce32(fasthash64(k, len, seed));