Created
February 2, 2016 22:59
-
-
Save maksspace/b074f0530ad37cc60860 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { void *prev, *next; } node_link_t; | |
void* list_prepend(void* node, void* head) { | |
*(node_link_t*)node = (node_link_t){NULL, head}; | |
return ((node_link_t*)head)->prev = node; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment