Checking typedef defined function pointer for null

Viewed 4670

Following on from this excellent SO answer on function pointers; given a function pointer defined in C like:

typedef void (*Callback)(int argument);
Callback my_callback = 0;

how do I check whether the callback function pointer has been assigned a non-null value?

my_callback == 0 or &my_callback == 0?

2 Answers
Related