Commit 58c81e7e authored by Richard Levitte's avatar Richard Levitte
Browse files

Reformat M_check_autoarg to match our coding style



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2121)
(cherry picked from commit 2629440d)
parent 222333cf
Loading
Loading
Loading
Loading
+16 −19
Original line number Diff line number Diff line
@@ -65,21 +65,18 @@
#include "evp_locl.h"

#define M_check_autoarg(ctx, arg, arglen, err) \
        if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) \
                { \
    if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) {           \
        size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey);         \
                if (pksize == 0) \
                        { \
                                                                  \
        if (pksize == 0) {                                        \
            EVPerr(err, EVP_R_INVALID_KEY); /*ckerr_ignore*/      \
            return 0;                                             \
        }                                                         \
                else if (!arg)                 \
                        { \
        if (!arg) {                                               \
            *arglen = pksize;                                     \
            return 1;                                             \
        }                                                         \
                else if (*arglen < pksize) \
                        { \
        if (*arglen < pksize) {                                   \
            EVPerr(err, EVP_R_BUFFER_TOO_SMALL); /*ckerr_ignore*/ \
            return 0;                                             \
        }                                                         \