lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/4] trace-cmd: Use unsigned values in Hsieh's trace_hash fast hash function
Date
Signed-off-by: Michael Sartain <mikesart@fastmail.com>
---
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
\
 
 \ /
  Last update: 2017-10-16 18:56    [W:0.043 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site