From: Kamil Dudka Date: Thu, 4 Feb 2016 09:41:15 +0000 (+0100) Subject: nss: do not count enabled cipher-suites X-Git-Tag: curl-7_48_0~156 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6390e6566489974a99ceed931f1eed9a1142d365;p=curl nss: do not count enabled cipher-suites We only care if at least one cipher-suite is enabled, so it does not make any sense to iterate till the end and count all enabled cipher-suites. --- diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index 722ea88ef..2fc3f433a 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -275,21 +275,21 @@ static SECStatus set_ciphers(struct SessionHandle *data, PRFileDesc * model, } /* - * Get the number of ciphers that are enabled. We use this to determine + * Return true if at least one cipher-suite is enabled. Used to determine * if we need to call NSS_SetDomesticPolicy() to enable the default ciphers. */ -static int num_enabled_ciphers(void) +static bool any_cipher_enabled(void) { - PRInt32 policy = 0; - int count = 0; unsigned int i; for(i=0; i