]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/hash.c
Allow IRC ops to change channel modes even without OperServerMode set
[ngircd-alex.git] / src / ngircd / hash.c
index 3bf2417fd146027d7ed2e147c9bd3e15ae122cea..1b2f4e678b412df818c53d81a7c7c91dc2f753f6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: hash.c,v 1.12 2005/07/31 20:13:08 alex Exp $";
+static char UNUSED id[] = "$Id: hash.c,v 1.13 2006/10/06 21:23:47 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -31,14 +31,15 @@ static UINT32 jenkins_hash PARAMS(( register UINT8 *k, register UINT32 length, r
 
 
 GLOBAL UINT32
-Hash( char *String )
+Hash( const char *String )
 {
        /* Hash-Wert ueber String berechnen */
 
        char buffer[LINE_LEN];
 
-       strlcpy( buffer, String, sizeof( buffer ));
-       return jenkins_hash( (UINT8 *)ngt_LowerStr( buffer ), strlen( buffer ), 42 );
+       strlcpy(buffer, String, sizeof(buffer));
+       return jenkins_hash((UINT8 *)ngt_LowerStr(buffer),
+                           (UINT32)strlen(buffer), 42);
 } /* Hash */