Skip to content

Commit 3fc5618

Browse files
committed
agx: properly applied hash function suggestion
1 parent d2d5999 commit 3fc5618

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/iop/agx.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,7 @@ typedef struct
271271
// djb2 hash
272272
static inline guint _agx_primaries_hash(const gconstpointer p)
273273
{
274-
guint hash = 5381;
275-
const unsigned char *data = p;
276-
size_t len = sizeof(_agx_primaries_key);
277-
278-
while(len-- > 0)
279-
{
280-
hash = (hash << 5) + hash + *data++;
281-
}
282-
return hash;
274+
return dt_hash(5381, p, sizeof(_agx_primaries_key));
283275
}
284276

285277
static inline gboolean _agx_primaries_equal(const gconstpointer a, const gconstpointer b)

0 commit comments

Comments
 (0)