summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c
index f0e4939..40de320 100644
--- a/usr.sbin/pmcstat/pmcstat_log.c
+++ b/usr.sbin/pmcstat/pmcstat_log.c
@@ -307,10 +307,10 @@ pmcstat_stats_reset(int reset_global)
static int
pmcstat_string_compute_hash(const char *s)
{
- int hash;
+ unsigned hash;
- for (hash = 0; *s; s++)
- hash ^= *s;
+ for (hash = 2166136261; *s; s++)
+ hash = (hash ^ *s) * 16777619;
return (hash & PMCSTAT_HASH_MASK);
}
OpenPOWER on IntegriCloud