diff options
author | Richard Levitte <levitte@openssl.org> | 2016-12-20 19:21:00 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-12-20 23:22:33 +0100 |
commit | 38bf0e64f7a06f35edf66968b991222017e41984 (patch) | |
tree | 19d435f37fd10105cd27505e69a6b56407532985 | |
parent | 22e9f9211de80d7edcb1bd3b86eef7611718ab5c (diff) |
Reformat M_check_autoarg to match our coding style
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2121)
(cherry picked from commit 2629440d42e4d64cd0cb849c1b19fa87a4fcb90f)
-rw-r--r-- | crypto/evp/pmeth_fn.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/crypto/evp/pmeth_fn.c b/crypto/evp/pmeth_fn.c index e9b20a6088..eb638019ce 100644 --- a/crypto/evp/pmeth_fn.c +++ b/crypto/evp/pmeth_fn.c @@ -15,25 +15,22 @@ #include "internal/evp_int.h" #define M_check_autoarg(ctx, arg, arglen, err) \ - if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) \ - { \ - size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey); \ - if (pksize == 0) \ - { \ - EVPerr(err, EVP_R_INVALID_KEY); /*ckerr_ignore*/\ - return 0; \ - } \ - else if (!arg) \ - { \ - *arglen = pksize; \ - return 1; \ - } \ - else if (*arglen < pksize) \ - { \ - EVPerr(err, EVP_R_BUFFER_TOO_SMALL); /*ckerr_ignore*/\ - return 0; \ - } \ - } + if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) { \ + size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey); \ + \ + if (pksize == 0) { \ + EVPerr(err, EVP_R_INVALID_KEY); /*ckerr_ignore*/ \ + return 0; \ + } \ + if (!arg) { \ + *arglen = pksize; \ + return 1; \ + } \ + if (*arglen < pksize) { \ + EVPerr(err, EVP_R_BUFFER_TOO_SMALL); /*ckerr_ignore*/ \ + return 0; \ + } \ + } int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx) { |