]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
libnccs: Fix casts between integers and pointers
authorMartin Willi <martin@revosec.ch>
Thu, 9 Jan 2014 14:00:09 +0000 (15:00 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 4 Jun 2014 13:53:07 +0000 (15:53 +0200)
src/libtnccs/plugins/tnc_imc/tnc_imc.c

index 6af8d166d4a88ace30c19eddee8e8618cf0525c7..623da7f62794451d3de873c5c4639402de2d6b79 100644 (file)
@@ -97,7 +97,7 @@ METHOD(imc_t, add_id, void,
        void *pointer;
 
        /* store the scalar value in the pointer */
-       pointer = (void*)id;
+       pointer = (void*)(uintptr_t)id;
        this->additional_ids->insert_last(this->additional_ids, pointer);
 }
 
@@ -126,7 +126,7 @@ METHOD(imc_t, has_id, bool,
        while (enumerator->enumerate(enumerator, &pointer))
        {
                /* interpret pointer as scalar value */
-               additional_id = (TNC_UInt32)pointer;
+               additional_id = (uintptr_t)pointer;
 
                if (id == additional_id)
                {