Just as a paranoia thing, I think that it's worthwhile having a default in this case statement. Otherwise, if it every did get called with a bad argument, we'll wind up calling f as an uninitialzed function pointer, which essentially means that it will have some random value. These can be particularly nasty bugs to track down, especally on embedded platforms.

Initializing f to NULL and doing a check after the switch would also work, although I think that using the default would offer a microscopic performance improvement.