nolan <[email protected]> writes: (with top-posting repaired!)
> On 07/23/2015 06:52 AM, Denil Vira wrote: >> Coverity Scan ID 1302488. Test for size==0 makes no sense, since assert >> immediately before it >> would not let this code happen. What namespace are these scan ids in? Are they someplace public that's committed to existing for a lont time? If they aren't, I would prefer that they not be in the commit messages. > Asserts are sometimes compiled out, so the redundant check is > necessary. The optimizer will cull it if asserts are enabled, so it > doesn't hurt the generated code. Really we need rules in our style/design guide that addresses this, and then we can evaluate the code against the rules. It's an entirely reasonable style (known as design by contract) to have asserts at the beginning of a function to check the documented calling conventions. Then, one would expect the asserts to remain in production. Having asserts and then conditionals to return errors seems overly complex to me.
pgp9qxluPjG_3.pgp
Description: PGP signature
_______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
