diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2016-08-31 10:06:05 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2016-08-31 10:06:05 +0000 |
commit | 3824990017170e2c79188b2b8257dc09e635e7f9 (patch) | |
tree | dad49446de2902cf319f055d7ef256c9a3aab393 /lib/libcrypto/ec | |
parent | a3e213069d844ee93e894619d058c73c6dbc8abc (diff) |
Fix some very unnecessary convoultion.
ok krw@
Diffstat (limited to 'lib/libcrypto/ec')
-rw-r--r-- | lib/libcrypto/ec/ec_lib.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/lib/libcrypto/ec/ec_lib.c b/lib/libcrypto/ec/ec_lib.c index 2b5abbd4bbf..4842ff2589d 100644 --- a/lib/libcrypto/ec/ec_lib.c +++ b/lib/libcrypto/ec/ec_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_lib.c,v 1.20 2015/10/13 15:25:18 jsing Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.21 2016/08/31 10:06:04 beck Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -233,24 +233,13 @@ EC_GROUP * EC_GROUP_dup(const EC_GROUP * a) { EC_GROUP *t = NULL; - int ok = 0; - if (a == NULL) - return NULL; - - if ((t = EC_GROUP_new(a->meth)) == NULL) - return (NULL); - if (!EC_GROUP_copy(t, a)) - goto err; - - ok = 1; - -err: - if (!ok) { + if ((a != NULL) && ((t = EC_GROUP_new(a->meth)) != NULL) && + (!EC_GROUP_copy(t, a))) { EC_GROUP_free(t); - return NULL; - } else - return t; + t = NULL; + } + return t; } |