From 62c0ce9b767cd319080c4804b49b77a13cf4a778 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 2 Sep 2004 01:31:21 +0000
Subject: [PATCH] hash functions now accept a void* argument and hashstr
 functions accept a char* argument.

---
 src/smblib/smblib.c | 8 ++++----
 src/smblib/smblib.h | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/smblib/smblib.c b/src/smblib/smblib.c
index 5795b1709d..d06a3e96d1 100644
--- a/src/smblib/smblib.c
+++ b/src/smblib/smblib.c
@@ -2540,7 +2540,7 @@ static char* strip_chars(uchar* str, uchar* set)
 /* Allocates and calculates hashes of data (based on flags)					*/
 /* Returns NULL on failure													*/
 hash_t* SMBCALL smb_hash(ulong msgnum, ulong t, unsigned source, unsigned flags
-						 ,const uchar* data, size_t length)
+						 ,const void* data, size_t length)
 {
 	hash_t*	hash;
 
@@ -2565,7 +2565,7 @@ hash_t* SMBCALL smb_hash(ulong msgnum, ulong t, unsigned source, unsigned flags
 /* Supports string hash "pre-processing" (e.g. lowercase, strip whitespace)	*/
 /* Returns NULL on failure													*/
 hash_t* SMBCALL smb_hashstr(ulong msgnum, ulong t, unsigned source, unsigned flags
-							,const uchar* str)
+							,const char* str)
 {
 	uchar*	p=(uchar*)str;
 	hash_t*	hash;
@@ -2645,7 +2645,7 @@ int SMBCALL smb_hashmsg(smb_t* smb, smbmsg_t* msg, const uchar* text, BOOL updat
 
 /* length=0 specifies ASCIIZ data											*/
 int SMBCALL smb_getmsgidx_by_hash(smb_t* smb, smbmsg_t* msg, unsigned source
-								 ,unsigned flags, const uchar* data, size_t length)
+								 ,unsigned flags, const void* data, size_t length)
 {
 	int			retval;
 	size_t		n;
@@ -2680,7 +2680,7 @@ int SMBCALL smb_getmsgidx_by_hash(smb_t* smb, smbmsg_t* msg, unsigned source
 }
 
 int SMBCALL smb_getmsghdr_by_hash(smb_t* smb, smbmsg_t* msg, unsigned source
-								 ,unsigned flags, const uchar* data, size_t length)
+								 ,unsigned flags, const void* data, size_t length)
 {
 	int retval;
 
diff --git a/src/smblib/smblib.h b/src/smblib/smblib.h
index 7f09f9fda5..17a4ef7324 100644
--- a/src/smblib/smblib.h
+++ b/src/smblib/smblib.h
@@ -166,17 +166,17 @@ SMBEXPORT int		SMBCALL smb_updatethread(smb_t* smb, smbmsg_t* remsg, ulong newms
 SMBEXPORT int		SMBCALL smb_findhash(smb_t* smb, hash_t** compare_list, hash_t* found, BOOL mark);
 SMBEXPORT int		SMBCALL smb_hashmsg(smb_t* smb, smbmsg_t* msg, const uchar* text, BOOL update);
 SMBEXPORT hash_t*	SMBCALL	smb_hash(ulong msgnum, ulong time, unsigned source
-								,unsigned flags, const uchar* data, size_t length);
+								,unsigned flags, const void* data, size_t length);
 SMBEXPORT hash_t*	SMBCALL	smb_hashstr(ulong msgnum, ulong time, unsigned source
-								,unsigned flags, const uchar* str);
+								,unsigned flags, const char* str);
 SMBEXPORT hash_t**	SMBCALL smb_msghashes(smb_t* smb, smbmsg_t* msg, const uchar* text);
 SMBEXPORT int		SMBCALL smb_addhashes(smb_t* smb, hash_t** hash_list);
 
 /* Fast look-up functions (using hashes) */
 SMBEXPORT int 		SMBCALL smb_getmsgidx_by_hash(smb_t* smb, smbmsg_t* msg, unsigned source
-								 ,unsigned flags, const uchar* data, size_t length);
+								 ,unsigned flags, const void* data, size_t length);
 SMBEXPORT int 		SMBCALL smb_getmsghdr_by_hash(smb_t* smb, smbmsg_t* msg, unsigned source
-								 ,unsigned flags, const uchar* data, size_t length);
+								 ,unsigned flags, const void* data, size_t length);
 
 /* 0-length specifies ASCIIZ data (length calculated automatically) */
 #define smb_getmsgidx_by_hashstr(smb, msg, source, flags, data) \
-- 
GitLab