Is it safe to convert an int pointer to void pointer and then back to int pointer?
main()
{
    ...
    int *a = malloc(sizeof(int));
    ...
    *a=10;
    func(a);
    ...
}
void func(void *v)
{
    int x=*(int *)v;
    ...
}
Is this a valid way of getting the integer value back in the function?