engine/eng_lib.c: remove redundant #ifdef.
authorAndy Polyakov <appro@openssl.org>
Fri, 3 Aug 2018 08:20:59 +0000 (10:20 +0200)
committerAndy Polyakov <appro@openssl.org>
Tue, 7 Aug 2018 07:08:46 +0000 (09:08 +0200)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6786)

crypto/engine/eng_lib.c

index 9028319788fb014c3c998a7ec9a2508a07e69498..3ef3aae28a210a5e08c26d3b9b2cd1605c323c1f 100644 (file)
@@ -75,14 +75,10 @@ int engine_free_util(ENGINE *e, int not_locked)
 
     if (e == NULL)
         return 1;
-#ifdef HAVE_ATOMICS
-    CRYPTO_DOWN_REF(&e->struct_ref, &i, global_engine_lock);
-#else
     if (not_locked)
-        CRYPTO_atomic_add(&e->struct_ref, -1, &i, global_engine_lock);
+        CRYPTO_DOWN_REF(&e->struct_ref, &i, global_engine_lock);
     else
         i = --e->struct_ref;
-#endif
     engine_ref_debug(e, 0, -1);
     if (i > 0)
         return 1;