Donald Sharp <[email protected]> writes:

> These scan id's are from coverity.  They provide a open source scanning
> tool.  I assumed since one of the maintainers was running the scan that it
> was a well known resource for Quagga:
>
> https://scan5.coverity.com:8443/reports.htm#v40850/p10064
>
> Hence my request for Denil to put the scan id in, it seemed more than
> reasonable at the time.

Thanks.  I was asking because I have (in other than quagga) seen lots of
random identifiers that it wasn't clear where they were from.   The
scan.coverity.com ids indeed seems reasonable to me (vs. some private
install). I hadn't seen/noticed any in a while.

> As for the assert, since I knew that asserts were always compiled into the
> code, I figured the removal of the if statement was the correct thing to
> do, hence my instructions to Denil to do so.

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.

Attachment: pgpLP8Lg2G_sn.pgp
Description: PGP signature

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to