On Wed, 2015-11-04 at 09:01 +0100, Takashi Iwai wrote:
On Wed, 04 Nov 2015 08:46:04 +0100, Andreas Schwab wrote:
Takashi Iwai
writes: Returning an integer or boolean value isn't necessarily wrong in many codes, and this can be such a case, I suppose (although I can't say exactly as I also haven't looked at the code).
It is never ok to return a boolean in a function that returns a pointer.
It is OK if it's cast. The returned value itself is same, just a different expression.
Returning a boolean FALSE (0) won't cause an issue - but TRUE? That translates to '1'. So in fact, you return a pointer on the address 0x1 and hope to get anything useful from there when accessing it. Sounds in most cases very fatal. Cheers, Dominique -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org