aboutsummaryrefslogtreecommitdiffstats
path: root/trace-hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace-hash.c')
-rw-r--r--trace-hash.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/trace-hash.c b/trace-hash.c
index eb917ec..93da360 100644
--- a/trace-hash.c
+++ b/trace-hash.c
@@ -1,3 +1,23 @@
1/*
2 * Copyright (C) 2009, Steven Rostedt <srostedt@redhat.com>
3 *
4 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License (not later!)
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 */
1#include <stdio.h> 21#include <stdio.h>
2#include <string.h> 22#include <string.h>
3#include <stdarg.h> 23#include <stdarg.h>
@@ -15,6 +35,8 @@ guint trace_hash(gint val)
15 /* 35 /*
16 * The following hash is based off of Paul Hsieh's super fast hash: 36 * The following hash is based off of Paul Hsieh's super fast hash:
17 * http://www.azillionmonkeys.com/qed/hash.html 37 * http://www.azillionmonkeys.com/qed/hash.html
38 * Note, he released this code unde the GPL 2.0 license, which
39 * is the same as the license for the programs that use it here.
18 */ 40 */
19 41
20 hash += (val & 0xffff); 42 hash += (val & 0xffff);