diff options
Diffstat (limited to 'ext/dba/libcdb/cdb.c')
| -rw-r--r-- | ext/dba/libcdb/cdb.c | 9 |
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 $"; } /* }}} */ |
