Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix racey behavior in job log test + minor cleanups #942
Current coverage is 76.06% (diff: 26.31%)
@@ master #942 diff @@ ========================================== Files 149 149 Lines 25951 25962 +11 Methods 0 0 Messages 0 0 Branches 0 0 ========================================== + Hits 19742 19748 +6 - Misses 6209 6214 +5 Partials 0 0
garlick left a comment
I think you missed adding endptr to the strtoul call.
Also the errno reuslt can only happen with a zero return so we could explicitly test for that before looking at errno (The way they use errno here is pretty unorthodox), or we could skip that check and let the subsequent bounds checking take care of it since 0 is not a valid branching factor for the TBON.
Strike that last comment - just saw the advice in the NOTES section of the man page
I guess let's do that then. Meh.