Function returns -1, so it can't be _Bool. Change to int.