When people see bool, they know that there are exactly two different values to be returned.
When people see int, they should guess or read documantation. Also they have to keep in mind that this particular int stands for boolean error return (0 or -1).
int as return value is the old way when C didn't have bool, we shouldn't stick to it today.
When people see bool, they know that there are exactly two different values to be returned. When people see int, they should guess or read documantation. Also they have to keep in mind that this particular int stands for boolean error return (0 or -1). int as return value is the old way when C didn't have bool, we shouldn't stick to it today.