You could create a list structure that contains a pointer to the first node (head) and the last node (tail) (for quick append to end of list), and pass a pointer to this structure in your functions. The "curr" pointer should be local to the functions. If you need a global "curr" pointer, put it in the list structure.