Created
February 4, 2011 14:41
-
-
Save DanielG/811182 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| struct socklist | |
| { | |
| struct socket_t sl_socket; | |
| struct socklist* sl_next; | |
| }; | |
| static int sl_add(socklist** list, socket_t socket) | |
| { | |
| struct socklist* sl = (socklist*) malloc(sizeof(socklist)); | |
| if(sl == NULL) { | |
| return -1; | |
| } | |
| sl->sl_socket = socket; | |
| sl->sl_next = list | |
| *list = sl; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment