Update linkedlist.c

Refactored the linkedlist type using void* instead of union and the type of the value.