Fix a boolean value to pointer value cast warning