]> git.rm.cloudns.org Git - xonotic/d0_blind_id.git/commitdiff
don't read so much from /dev/random as it's slow
authorRudolf Polzer <divverent@alientrap.org>
Sat, 24 Apr 2010 19:58:11 +0000 (21:58 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 24 Apr 2010 19:58:11 +0000 (21:58 +0200)
d0_bignum-gmp.c

index 87aa0b88432bec07d64263e5764656ac755debab..a66096dff4b910835e52ae3b9ac1131030a7653f 100644 (file)
@@ -41,6 +41,7 @@ void d0_bignum_INITIALIZE()
        if(f)
        {
                unsigned char buf[256];
+               setbuf(f, NULL);
                if(fread(buf, sizeof(buf), 1, f) == 1)
                {
                        mpz_import(temp.z, sizeof(buf), 1, 1, 0, 0, buf);