Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_misc.c 


Log Message:
remove hard coded value, besides that the check was wrong

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -3 -r1.113 -r1.114
--- ewl_misc.c  14 Jul 2008 17:27:20 -0000      1.113
+++ ewl_misc.c  18 Jul 2008 12:04:43 -0000      1.114
@@ -146,10 +146,12 @@
 int
 ewl_cast_pointer_to_integer(void *ptr)
 {
+        const unsigned int imask = ~0;
+        const unsigned long int mask = ~((unsigned long int) imask);
+
         DENTER_FUNCTION(DLEVEL_STABLE);
 
-        if (sizeof(int) != sizeof(void *) 
-                        && (((unsigned long) ptr) & 0xffffffff) != 0)
+        if (((unsigned long) ptr) & mask)
                 DWARNING("Information lost while casting a pointer to an int");
 
         DRETURN_INT((int)((long int)ptr), DLEVEL_STABLE);



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to