]> granicus.if.org Git - haveged/commitdiff
Fix type mismatch in get_poolsize
authorAndreas Schwab <schwab@suse.de>
Thu, 25 Jul 2019 09:19:12 +0000 (11:19 +0200)
committerAndreas Schwab <schwab@suse.de>
Thu, 25 Jul 2019 09:19:12 +0000 (11:19 +0200)
Make max_bits signed so that error checking works.

src/haveged.c

index 9788bda42d39d4e0c1ef974c64b4b1418cfc95a3..543d833f94fb08c2c2c184d82af7d2f7ce5bbf52 100644 (file)
@@ -496,7 +496,8 @@ static int get_poolsize(   /* RETURN: number of bits  */
    void)                   /* IN: nothing             */
 {
    FILE *poolsize_fh,*osrel_fh;
-   unsigned int max_bits,major,minor;
+   unsigned int major,minor;
+   int max_bits;
 
    poolsize_fh = fopen(params->poolsize, "rb");
    if (poolsize_fh) {