Don't need extern "C" this is C.
Fix silly comparison
Updated example code.