From: Andreas Steffen Date: Sat, 18 Dec 2010 19:24:53 +0000 (+0100) Subject: cast enumerated algorithm type as int X-Git-Tag: 4.5.1~371 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f10e72341cd53bf4b4a0587c3e03b00e7dbd1f6f;p=thirdparty%2Fstrongswan.git cast enumerated algorithm type as int --- diff --git a/src/libtls/tls_crypto.c b/src/libtls/tls_crypto.c index 7b013e0356..b4eaf4d795 100644 --- a/src/libtls/tls_crypto.c +++ b/src/libtls/tls_crypto.c @@ -628,15 +628,16 @@ static void filter_suite(private_tls_crypto_t *this, { const char *plugin_name; suite_algs_t current; - int i, remaining = 0; + int *current_alg, i, remaining = 0; enumerator_t *enumerator; memset(¤t, 0, sizeof(current)); + current_alg = (int*)((char*)¤t + offset); + for (i = 0; i < *count; i++) { enumerator = create_enumerator(lib->crypto); - while (enumerator->enumerate(enumerator, ((char*)¤t) + offset), - &plugin_name) + while (enumerator->enumerate(enumerator, current_alg, &plugin_name)) { if ((suites[i].encr == ENCR_NULL || !current.encr || current.encr == suites[i].encr) &&