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 9028319..3ef3aae 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;