[PATCH v2 4/4] trace-cmd: Use unsigned values in Hsieh's trace_hash fast hash function

From: Michael Sartain
Date: Mon Oct 16 2017 - 12:56:26 EST


Signed-off-by: Michael Sartain <mikesart@xxxxxxxxxxxx>
---
trace-hash-local.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/trace-hash-local.h b/trace-hash-local.h
index b2a1002..7c822a8 100644
--- a/trace-hash-local.h
+++ b/trace-hash-local.h
@@ -20,9 +20,9 @@
#ifndef _TRACE_HASH_LOCAL_H
#define _TRACE_HASH_LOCAL_H

-static inline unsigned int trace_hash(int val)
+static inline unsigned int trace_hash(unsigned int val)
{
- int hash, tmp;
+ unsigned int hash, tmp;

hash = 12546869; /* random prime */

--
2.14.2