From: Juergen Perlinger Date: Tue, 6 Sep 2022 17:15:41 +0000 (+0200) Subject: [4.2.8p16 rc] c99-ism breaks VS2008 build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adc409cfd9560378ce6ca43fcd71b132d801c14b;p=thirdparty%2Fntp.git [4.2.8p16 rc] c99-ism breaks VS2008 build bk: 6317803ds7ox67vksL1LDJJRXMEIMQ --- diff --git a/libntp/ntp_crypto_rnd.c b/libntp/ntp_crypto_rnd.c index 6a1a1b827..b43e3eecd 100644 --- a/libntp/ntp_crypto_rnd.c +++ b/libntp/ntp_crypto_rnd.c @@ -109,10 +109,7 @@ ntp_crypto_random_buf( return (-1); #ifdef USE_OPENSSL_CRYPTO_RAND - int rc; - - rc = RAND_bytes(buf, size2int_chk(nbytes)); - if (1 != rc) { + if (1 != RAND_bytes(buf, size2int_chk(nbytes))) { unsigned long err; char *err_str; @@ -123,9 +120,8 @@ ntp_crypto_random_buf( return -1; } - return 0; #else arc4random_buf(buf, nbytes); - return 0; #endif + return 0; }