Version 1.02.03 -
============================
+ Fix hash function to avoid using a negative array offset.
Don't inline _find in hash.c and tidy signed/unsigned etc.
Fix libdevmapper.h #endif.
Fix dmsetup version driver version.
return n;
}
-static unsigned long _hash(const char *str, unsigned len)
+static unsigned long _hash(const unsigned char *str, unsigned len)
{
unsigned long h = 0, g;
unsigned i;
for (i = 0; i < len; i++) {
h <<= 4;
- h += _nums[(int) *str++];
+ h += _nums[*str++];
g = h & ((unsigned long) 0xf << 16u);
if (g) {
h ^= g >> 16u;