[sr-dev] git:master:d4f8674d: core: hashes - small helper macro to compute hash slot index

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 21 19:46:12 CEST 2020


Module: kamailio
Branch: master
Commit: d4f8674d0068a31bed7097804f37b6bff5fe21fb
URL: https://github.com/kamailio/kamailio/commit/d4f8674d0068a31bed7097804f37b6bff5fe21fb

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-04-21T17:30:37+02:00

core: hashes - small helper macro to compute hash slot index

---

Modified: src/core/hashes.h

---

Diff:  https://github.com/kamailio/kamailio/commit/d4f8674d0068a31bed7097804f37b6bff5fe21fb.diff
Patch: https://github.com/kamailio/kamailio/commit/d4f8674d0068a31bed7097804f37b6bff5fe21fb.patch

---

diff --git a/src/core/hashes.h b/src/core/hashes.h
index 5b8e2f2773..2afb8361c8 100644
--- a/src/core/hashes.h
+++ b/src/core/hashes.h
@@ -27,7 +27,7 @@
 
 #include "str.h"
 
-
+#define core_hash_idx(hid, hsize) ((hid)&(hsize-1))
 
 /** internal use: hash update
  * params: char* s   - string start,




More information about the sr-dev mailing list