OSDN Git Service

g2meet: use an unsigned type for the djb hash
authorJanne Grunau <janne-libav@jannau.net>
Wed, 1 Jul 2015 11:34:50 +0000 (13:34 +0200)
committerJanne Grunau <janne-libav@jannau.net>
Wed, 1 Jul 2015 11:34:50 +0000 (13:34 +0200)
libavcodec/g2meet.c

index d0b36f0..600e2b2 100644 (file)
@@ -399,7 +399,7 @@ static inline int log2_ceil(uint32_t x)
 /* improved djb2 hash from http://www.cse.yorku.ca/~oz/hash.html */
 static int djb2_hash(uint32_t key)
 {
-    int h = 5381;
+    uint32_t h = 5381;
 
     h = (h * 33) ^ ((key >> 24) & 0xFF); // xxx: probably not needed at all
     h = (h * 33) ^ ((key >> 16) & 0xFF);