From dc8c37aa596765dfb41a47644f3bf5e2a442fdd4 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Mon, 24 Dec 2018 15:56:38 +0100 Subject: [PATCH] Removing another fake nested function. --- src/arachne.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/arachne.c b/src/arachne.c index 1bc48f8..2f71cd0 100644 --- a/src/arachne.c +++ b/src/arachne.c @@ -2694,6 +2694,26 @@ arachneClaim () return false; } +//! Helper for arachne +int +determine_encrypt_max (Protocol p, Role r, Roledef rd, int index) +{ + int tlevel; + + tlevel = term_encryption_level (rd->message); +#ifdef DEBUG + if (DEBUGL (3)) + { + eprintf ("Encryption level %i found for term ", tlevel); + termPrint (rd->message); + eprintf ("\n"); + } +#endif + if (tlevel > max_encryption_level) + max_encryption_level = tlevel; + return 1; +} + //! Main code for Arachne /** @@ -2721,24 +2741,6 @@ arachne () return 1; } - int determine_encrypt_max (Protocol p, Role r, Roledef rd, int index) - { - int tlevel; - - tlevel = term_encryption_level (rd->message); -#ifdef DEBUG - if (DEBUGL (3)) - { - eprintf ("Encryption level %i found for term ", tlevel); - termPrint (rd->message); - eprintf ("\n"); - } -#endif - if (tlevel > max_encryption_level) - max_encryption_level = tlevel; - return 1; - } - /* * set up claim role(s) */