What is the meaning of " ( void * ) " in : if ( test == ( void * ) -1 )

Viewed 1860

The function returns -1.

However, what is the meaning of (void*) in the following code:

can it work without it ?

test = shmat(shm_id, NULL, 0);

if (test == (void *)-1) {
    /* handle shmat failure */
}
2 Answers
Related