Fix name of "locked" variable
authorKurt Roeckx <kurt@roeckx.be>
Sat, 3 Sep 2016 19:27:30 +0000 (21:27 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Thu, 17 Nov 2016 21:02:25 +0000 (22:02 +0100)
It's called with 0 when it's already locked, with 1 when it's not.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1500

crypto/engine/eng_int.h
crypto/engine/eng_lib.c

index 741e6876b62500e7e777836d771d3ffcd64ac511..f7bc706f161c173cd8d78bcaa49d5cd06dede339 100644 (file)
@@ -104,7 +104,7 @@ void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
  */
 int engine_unlocked_init(ENGINE *e);
 int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers);
-int engine_free_util(ENGINE *e, int locked);
+int engine_free_util(ENGINE *e, int not_locked);
 
 /*
  * This function will reset all "set"able values in an ENGINE to NULL. This
index 8a21f38028d1b37ac86bac86ebd2316e53b070f9..385af54919fbc9789c271b74fb15f19c74a2ef54 100644 (file)
@@ -67,7 +67,7 @@ void engine_set_all_null(ENGINE *e)
     e->flags = 0;
 }
 
-int engine_free_util(ENGINE *e, int locked)
+int engine_free_util(ENGINE *e, int not_locked)
 {
     int i;
 
@@ -76,7 +76,7 @@ int engine_free_util(ENGINE *e, int locked)
 #ifdef HAVE_ATOMICS
     CRYPTO_DOWN_REF(&e->struct_ref, &i, global_engine_lock);
 #else
-    if (locked)
+    if (not_locked)
         CRYPTO_atomic_add(&e->struct_ref, -1, &i, global_engine_lock);
     else
         i = --e->struct_ref;