On Sat, Jul 25, 2015 at 11:57:39AM -0400, Greg Troxel wrote: > I agree with you that the extra ifs should come out. I just have a > long-standing frustration with many things, not just quagga, where the > design isn't written down, so it's hard to review changes to see if they > are ok, without having a lot of implicit context. > > Currently stream.c has a mix of warn/print/assert with various things > checked, and is quite a mess. But I don't object to the proposed > change. I would be inclined to move more towards a design-by-contract > style where all preconditions are asserted (perhaps with macros). And > perhaps postconditions - I suspect the compiler optimizes out those > asserts fairly often given the previous ones.
I personally hate asserts. They are a crappy way to deal with errors. Do something sane if an error happens, don't just explode. -- Len Sorensen _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
