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

[perl #74096] Test for snprintf is inverted

Thread Previous
Jesse Luehrs via RT
July 3, 2012 21:17
[perl #74096] Test for snprintf is inverted
Message ID:
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.


via perlbug:  queue: perl5 status: stalled

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About