develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #74096] Test for snprintf is inverted

Thread Previous
From:
Jesse Luehrs via RT
Date:
July 3, 2012 21:17
Subject:
[perl #74096] Test for snprintf is inverted
Message ID:
rt-3.6.HEAD-28836-1341375461-380.74096-15-0@perl.org
I don't think this is a bug. The program inverts the return value
because program exit codes have a different sense of truth than C does -
a program that exits with 0 (returns 0 from the main function, in this
case) succeeds, while a program that exits with 1 fails. Therefore, when
you're returning a success code from main(), you need to invert it. I
think we can close this unless someone can come up with a better
explanation of why the current behavior is wrong.

-doy

---
via perlbug:  queue: perl5 status: stalled
https://rt.perl.org:443/rt3/Ticket/Display.html?id=74096

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About