diff options
author | Rich Salz <rsalz@openssl.org> | 2017-12-08 15:08:43 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-12-08 15:08:43 -0500 |
commit | c6738fd208c143939b6bb7f7ac2061c0f5ff3272 (patch) | |
tree | a270d65f499b082d936057e1201acf76c98f570a /crypto/bn | |
parent | a1daedd88445397a4aebf22ba63e92c3f1977870 (diff) |
Standardize syntax around sizeof(foo)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4875)
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_print.c | 4 | ||||
-rw-r--r-- | crypto/bn/bntest.c | 2 | ||||
-rw-r--r-- | crypto/bn/expspeed.c | 2 | ||||
-rw-r--r-- | crypto/bn/exptest.c | 8 |
4 files changed, 9 insertions, 7 deletions
diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index f85a6550a5..c0b029dad6 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -391,10 +391,10 @@ char *BN_options(void) if (!init) { init++; #ifdef BN_LLONG - BIO_snprintf(data, sizeof data, "bn(%d,%d)", + BIO_snprintf(data, sizeof(data), "bn(%d,%d)", (int)sizeof(BN_ULLONG) * 8, (int)sizeof(BN_ULONG) * 8); #else - BIO_snprintf(data, sizeof data, "bn(%d,%d)", + BIO_snprintf(data, sizeof(data), "bn(%d,%d)", (int)sizeof(BN_ULONG) * 8, (int)sizeof(BN_ULONG) * 8); #endif } diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c index a327b1a647..abe5dbe0b0 100644 --- a/crypto/bn/bntest.c +++ b/crypto/bn/bntest.c @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) results = 0; - RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */ + RAND_seed(rnd_seed, sizeof(rnd_seed)); /* or BN_generate_prime may fail */ argc--; argv++; diff --git a/crypto/bn/expspeed.c b/crypto/bn/expspeed.c index 513a568a48..8ea980cdd2 100644 --- a/crypto/bn/expspeed.c +++ b/crypto/bn/expspeed.c @@ -198,7 +198,7 @@ static int mul_c[NUM_SIZES] = * static int sizes[NUM_SIZES]={59,179,299,419,539}; */ -#define RAND_SEED(string) { const char str[] = string; RAND_seed(string, sizeof str); } +#define RAND_SEED(string) { const char str[] = string; RAND_seed(string, sizeof(str)); } void do_mul_exp(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *c, BN_CTX *ctx); diff --git a/crypto/bn/exptest.c b/crypto/bn/exptest.c index ac611c2e26..779ee90203 100644 --- a/crypto/bn/exptest.c +++ b/crypto/bn/exptest.c @@ -183,9 +183,11 @@ int main(int argc, char *argv[]) unsigned char c; BIGNUM *r_mont, *r_mont_const, *r_recp, *r_simple, *a, *b, *m; - RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_rand may fail, and we - * don't even check its return - * value (which we should) */ + /* + * Seed or BN_rand may fail, and we don't even check its return + * value (which we should) + */ + RAND_seed(rnd_seed, sizeof(rnd_seed)); ERR_load_BN_strings(); |