You need to move the #endif that trails test_reply_get_preferred_network_type_valid() to after this function.