What is wrong with this code
This is snippet of large code. I want to understand why `compare_int` is not getting proper pointers.

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <assert.h>
    
    static int 
    compare_int ( void *left, void *right ) {
        int *l = (int*)left;
        int *r = (int*)right;
    
        if ( *l < *r ) 
            return -1;
        else if ( *l > *r ) 
            return 1;
        return 0;
    }
    
    int main()
    {
        void *data1 = malloc ( sizeof ( int));
        int i = 55;
        memcpy ( data1, &i, sizeof(int));
    
        void *data2 = malloc ( sizeof ( int));
        int j = 65;
        memcpy ( data2, &j, sizeof(int));
    
        compare_int ( data1, data2 );
    
    
    }
What is wrong with this code
===

This is snippet of large code. I want to understand why `compare_int` is not getting proper pointers.

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <assert.h>
    
    static int 
    compare_int ( void *left, void *right ) {
        int *l = (int*)left;
        int *r = (int*)right;
    
        if ( *l < *r ) 
            return -1;
        else if ( *l > *r ) 
            return 1;
        return 0;
    }
    
    int main()
    {
        void *data1 = malloc ( sizeof ( int));
        int i = 55;
        memcpy ( data1, &i, sizeof(int));
    
        void *data2 = malloc ( sizeof ( int));
        int j = 65;
        memcpy ( data2, &j, sizeof(int));
    
        compare_int ( data1, data2 );
    
    
    }