SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,14 @@
improve the hash function.
Index: freehdl/kernel-list.hh
--- freehdl/kernel-list.hh.orig
+++ freehdl/kernel-list.hh
@@ -634,7 +634,7 @@ get_hash(const shared_array<T> &a) {
unsigned int num = 0;
const int UINT_BIT = sizeof(unsigned int) * CHAR_BIT;
for (int i = 0; i < a.size(); i++)
- num = ((num << 2) || ((UINT_BIT - 2) >> 30)) + get_hash(a.content(i));
+ num = ((num << 2) | ((UINT_BIT - 2) >> 30)) + get_hash(a.content(i));
return num;
}