[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Richard Levitte levitte at openssl.org
Tue Dec 20 22:22:56 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  58c81e7e0b71fe45ae836c59506daac87199dcbb (commit)
      from  222333cf01e2fec4a20c107ac9e820694611a4db (commit)


- Log -----------------------------------------------------------------
commit 58c81e7e0b71fe45ae836c59506daac87199dcbb
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Dec 20 19:21:00 2016 +0100

    Reformat M_check_autoarg to match our coding style
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2121)
    (cherry picked from commit 2629440d42e4d64cd0cb849c1b19fa87a4fcb90f)

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/pmeth_fn.c | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/crypto/evp/pmeth_fn.c b/crypto/evp/pmeth_fn.c
index e11ad3d..727869e 100644
--- a/crypto/evp/pmeth_fn.c
+++ b/crypto/evp/pmeth_fn.c
@@ -65,25 +65,22 @@
 #include "evp_locl.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)
 {


More information about the openssl-commits mailing list