Fix warning caused by comparison between integer and pointer