Unindent error check in EC_GROUP_set_generator()
authortb <tb@openbsd.org>
Tue, 15 Oct 2024 17:44:43 +0000 (17:44 +0000)
committertb <tb@openbsd.org>
Tue, 15 Oct 2024 17:44:43 +0000 (17:44 +0000)
lib/libcrypto/ec/ec_lib.c

index 4b7eb60..11d09b6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_lib.c,v 1.68 2024/10/15 06:27:43 tb Exp $ */
+/* $OpenBSD: ec_lib.c,v 1.69 2024/10/15 17:44:43 tb Exp $ */
 /*
  * Originally written by Bodo Moeller for the OpenSSL project.
  */
@@ -335,11 +335,11 @@ EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
                return 0;
        }
 
-       if (group->generator == NULL) {
+       if (group->generator == NULL)
                group->generator = EC_POINT_new(group);
-               if (group->generator == NULL)
-                       return 0;
-       }
+       if (group->generator == NULL)
+               return 0;
+
        if (!EC_POINT_copy(group->generator, generator))
                return 0;