fix C pointer compare