]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix some more conversion errors on Linux.
authorRoy Marples <roy@marples.name>
Sun, 15 Mar 2015 16:12:20 +0000 (16:12 +0000)
committerRoy Marples <roy@marples.name>
Sun, 15 Mar 2015 16:12:20 +0000 (16:12 +0000)
compat/arc4random.c

index 963dd1f716f7943e43c34b4b0fae2cfdeeba7ef2..8fa07e8f1ae639729731c29912f9c6f2f3f9540b 100644 (file)
@@ -88,13 +88,13 @@ arc4_getbyte(struct arc4_stream *as)
 static uint32_t
 arc4_getword(struct arc4_stream *as)
 {
-       uint32_t val;
+       int val;
 
        val = arc4_getbyte(as) << 24;
        val |= arc4_getbyte(as) << 16;
        val |= arc4_getbyte(as) << 8;
        val |= arc4_getbyte(as);
-       return val;
+       return (uint32_t)val;
 }
 
 static void