]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
cast enumerated algorithm type as int
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 18 Dec 2010 19:24:53 +0000 (20:24 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 18 Dec 2010 19:24:53 +0000 (20:24 +0100)
src/libtls/tls_crypto.c

index 7b013e035674c1288b208d773ddd753294367759..b4eaf4d79518ffe82f7661296f6f3f0eaadb1202 100644 (file)
@@ -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(&current, 0, sizeof(current));
+       current_alg = (int*)((char*)&current + offset);
+
        for (i = 0; i < *count; i++)
        {
                enumerator = create_enumerator(lib->crypto);
-               while (enumerator->enumerate(enumerator, ((char*)&current) + offset),
-                                                                                                &plugin_name)
+               while (enumerator->enumerate(enumerator, current_alg, &plugin_name))
                {
                        if ((suites[i].encr == ENCR_NULL ||
                                 !current.encr || current.encr == suites[i].encr) &&