From f72dd0cf0f5f4b9082d022e26b1d4117b3a04d52 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 16:56:15 +0930 Subject: source3/lib/util.c: str_checksum to use Jenkins hash from CCAN. Rather than tdb's internal one. --- source3/lib/util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util.c b/source3/lib/util.c index d04887c854..b25c15c7a3 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -28,6 +28,7 @@ #include "ctdbd_conn.h" #include "../lib/util/util_pw.h" #include "messages.h" +#include /* Max allowable allococation - 256mb - 0x10000000 */ #define MAX_ALLOC_SIZE (1024*1024*256) @@ -1306,8 +1307,9 @@ const char *tab_depth(int level, int depth) int str_checksum(const char *s) { - TDB_DATA key = string_tdb_data(s); - return tdb_jenkins_hash(&key); + if (s == NULL) + return 0; + return hash(s, strlen(s), 0); } /***************************************************************** -- cgit