mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
Revert previous patch: Bad time for it.
This commit is contained in:
parent
9c47359912
commit
d61f44fa7c
1 changed files with 7 additions and 3 deletions
|
|
@ -29,13 +29,17 @@ bdb_db_hash(
|
|||
u_int32_t length
|
||||
)
|
||||
{
|
||||
u_int32_t i, ret = 0;
|
||||
u_int32_t ret = 0;
|
||||
unsigned char *dst = (unsigned char *)&ret;
|
||||
const unsigned char *src = (const unsigned char *)bytes;
|
||||
|
||||
if ( length > sizeof(u_int32_t) )
|
||||
length = sizeof(u_int32_t);
|
||||
|
||||
for( i = 0; i < length; i++ )
|
||||
ret = (ret << 8) + ((const unsigned char *)bytes)[i];
|
||||
while ( length ) {
|
||||
*dst++ = *src++;
|
||||
length--;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue