diff options
Diffstat (limited to 'crypto/engine/eng_table.c')
| -rw-r--r-- | crypto/engine/eng_table.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/engine/eng_table.c b/crypto/engine/eng_table.c index a83c3899ee111..8879a267d1432 100644 --- a/crypto/engine/eng_table.c +++ b/crypto/engine/eng_table.c @@ -135,7 +135,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,  			{  			fnd = OPENSSL_malloc(sizeof(ENGINE_PILE));  			if(!fnd) goto end; -			fnd->uptodate = 0; +			fnd->uptodate = 1;  			fnd->nid = *nids;  			fnd->sk = sk_ENGINE_new_null();  			if(!fnd->sk) @@ -147,12 +147,12 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,  			lh_insert(&(*table)->piles, fnd);  			}  		/* A registration shouldn't add duplciate entries */ -		sk_ENGINE_delete_ptr(fnd->sk, e); +		(void)sk_ENGINE_delete_ptr(fnd->sk, e);  		/* if 'setdefault', this ENGINE goes to the head of the list */  		if(!sk_ENGINE_push(fnd->sk, e))  			goto end;  		/* "touch" this ENGINE_PILE */ -		fnd->uptodate = 1; +		fnd->uptodate = 0;  		if(setdefault)  			{  			if(!engine_unlocked_init(e)) @@ -164,6 +164,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,  			if(fnd->funct)  				engine_unlocked_finish(fnd->funct, 0);  			fnd->funct = e; +			fnd->uptodate = 1;  			}  		nids++;  		} @@ -178,9 +179,8 @@ static void int_unregister_cb(ENGINE_PILE *pile, ENGINE *e)  	/* Iterate the 'c->sk' stack removing any occurance of 'e' */  	while((n = sk_ENGINE_find(pile->sk, e)) >= 0)  		{ -		sk_ENGINE_delete(pile->sk, n); -		/* "touch" this ENGINE_CIPHER */ -		pile->uptodate = 1; +		(void)sk_ENGINE_delete(pile->sk, n); +		pile->uptodate = 0;  		}  	if(pile->funct == e)  		{  | 
