On Thu, May 08, 2014 at 10:50:28PM +0200, Michael Tuexen wrote: M> > If "this should not happen" really means that we do not expect this issue M> > at all, assuming we are coding correctly, then all these comments and printfs M> > should be converted to KASSERTs. M> I tried to keep the style of the code... M> However, if the first one occurs, we are setting up a packet and have it too M> short to contain the checksum. This would really be bug in our code... So a KASSERT is fine. M> A KASSERT for the second case is also fine. M> The only difference between the above and the KASSERT version is that M> in case of problems the above just sends packets with wrong checksums M> and the KASSERT version will panic (when compiled with INVARIANTS) or M> panic (in case of m == NULL) or corrupt a byte. However, I also prefer M> the KASSERT version, it will help to get the code right... M> So I committed a change in M> http://svnweb.freebsd.org/changeset/base/265713 M> M> Thanks for your suggestion!
Thanks a lot, Michael! -- Totus tuus, Glebius. _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"