list_node.c
/* Create and initialize node with payload 'data'*/
Create and initialize node with payload 'data'
Create and initialize node with payload ' data '
void list_node_create(list_node_t **node, void *data)
{
	if (((*node) = (list_node_t*)malloc(sizeof(list_node_t))) == NULL) 
	{
		fprintf(stderr, "Failed to allocate list node\n");
		exit(EXIT_FAILURE);
	};
	(*node)->data = data; 
	(*node)->next = NULL;
	(*node)->prev = NULL;
}
void list_node_create ( list_node_t * * node , void * data ) { if ( ( ( * node ) = ( list_node_t * ) malloc ( sizeof ( list_node_t ) ) ) == NULL ) { fprintf ( stderr , " \n " ) ; exit ( EXIT_FAILURE ) ; } ; ( * node ) -> data = data ; ( * node ) -> next = NULL ; ( * node ) -> prev = NULL ; }
Create and initialize node with payload 'data'
Create and initialize node with payload ' data '