summaryrefslogtreecommitdiff
path: root/ext/dba/libcdb/cdb.c
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:27 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:27 -0400
commit2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch)
tree41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/dba/libcdb/cdb.c
parentd29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff)
downloadphp-upstream/5.2.2.tar.gz
Imported Upstream version 5.2.2upstream/5.2.2
Diffstat (limited to 'ext/dba/libcdb/cdb.c')
-rw-r--r--ext/dba/libcdb/cdb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c
index 6844ee866..f80676ec6 100644
--- a/ext/dba/libcdb/cdb.c
+++ b/ext/dba/libcdb/cdb.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cdb.c,v 1.10.2.1 2006/01/01 12:50:05 sniper Exp $ */
+/* $Id: cdb.c,v 1.10.2.1.2.3 2007/04/14 11:15:13 helly Exp $ */
/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
@@ -68,10 +68,11 @@ static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos TSRM
uint32 cdb_hash(char *buf, unsigned int len)
{
uint32 h;
+ const unsigned char * b = (unsigned char *)buf;
h = CDB_HASHSTART;
while (len--) {
- h = ( h + (h << 5)) ^ (*buf++);
+ h = ( h + (h << 5)) ^ (*b++);
}
return h;
}
@@ -188,6 +189,6 @@ int cdb_find(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
/* {{{ cdb_version */
char *cdb_version()
{
- return "0.75, $Revision: 1.10.2.1 $";
+ return "0.75, $Revision: 1.10.2.1.2.3 $";
}
/* }}} */