From: steudten <steudten@users.sourceforge.net>
Date: Thu, 20 Sep 2001 13:33:43 +0000 (+0000)
Subject: change long to int as return value in hash_string(). Remember the wraparound
X-Git-Tag: v_2_9_9~60
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@edit-actions-remove-url?a=commitdiff_plain;h=ce6c6f995de0bd346ed0ae3678edc67d3e873ed0;p=privoxy.git

change long to int as return value in hash_string(). Remember the wraparound
for int = long = sizeof(4) - thats maybe not what we want.
---

diff --git a/miscutil.c b/miscutil.c
index 8891c299..09eeffaa 100644
--- a/miscutil.c
+++ b/miscutil.c
@@ -1,4 +1,4 @@
-const char miscutil_rcs[] = "$Id: miscutil.c,v 1.16 2001/09/10 10:56:59 oes Exp $";
+const char miscutil_rcs[] = "$Id: miscutil.c,v 1.17 2001/09/13 20:51:29 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/miscutil.c,v $
@@ -36,6 +36,10 @@ const char miscutil_rcs[] = "$Id: miscutil.c,v 1.16 2001/09/10 10:56:59 oes Exp
  *
  * Revisions   :
  *    $Log: miscutil.c,v $
+ *    Revision 1.17  2001/09/13 20:51:29  jongfoster
+ *    Fixing potential problems with characters >=128 in simplematch()
+ *    This was also a compiler warning.
+ *
  *    Revision 1.16  2001/09/10 10:56:59  oes
  *    Silenced compiler warnings
  *
@@ -182,9 +186,9 @@ void *zalloc(int size)
  * Returns     :  an unsigned long variable with the hashed value.
  *
  *********************************************************************/
-unsigned long hash_string( const char* s )
+unsigned int hash_string( const char* s )
 {
-   unsigned long h = 0ul; 
+   unsigned int h = 0; 
 
    for ( ; *s; ++s )
    {