Remove unused function rsa_active.
[tinc] / src / hash.c
index 63b8f54..39e88c9 100644 (file)
@@ -29,11 +29,11 @@ static uint32_t hash_function(const void *p, size_t len) {
        uint32_t hash = 0;
 
        while(true) {
-               for(int i = len > 4 ? 4 : len; --i;) {
+               for(size_t i = len > 4 ? 4 : len; --i;) {
                        hash += (uint32_t)q[len - i] << (8 * i);
                }
 
-               hash *= 0x9e370001UL; // Golden ratio prime.
+               hash = (uint32_t)(hash * 0x9e370001UL); // Golden ratio prime.
 
                if(len <= 4) {
                        break;