I don't think the usage of function pointers is a big problem, but it was just an idea. If you need to pass to many "switch" type of variables, it gets hard to follow, sure. The two functions xavi_add_value, xavi_add_value_after just operate on a global static list. This could be implemented type safe by just passing the list to it, without the need of void pointers.