diff options
author | John Naylor <john.naylor@postgresql.org> | 2024-04-06 12:02:45 +0700 |
---|---|---|
committer | John Naylor <john.naylor@postgresql.org> | 2024-04-06 12:20:40 +0700 |
commit | 4b968e2027ba46b31be0a648486f86a2cadc707d (patch) | |
tree | bfe6adbf7a2079f30226a58f20d0b96633c18191 | |
parent | aa1e8c206454d666ab600050022aef2c3c390f69 (diff) | |
download | postgresql-4b968e2027ba46b31be0a648486f86a2cadc707d.tar.gz postgresql-4b968e2027ba46b31be0a648486f86a2cadc707d.zip |
Fix incorrect return type
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
-rw-r--r-- | src/include/common/hashfn_unstable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/common/hashfn_unstable.h b/src/include/common/hashfn_unstable.h index 791750d136c..1c782179cd6 100644 --- 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 uint64 +static inline uint32 fasthash32(const char *k, size_t len, uint64 seed) { return fasthash_reduce32(fasthash64(k, len, seed)); |