Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: ShadowAce

So, this :
   mtu -= hlen + sizeof(struct frag_hdr);
which could have been improved like this :
   if (mtu < hlen + sizeof(struct frag_hdr) + 8)
      goto fail_toobig;
   mtu -= hlen + sizeof(struct frag_hdr);
was instead re-written like this :
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) || mtu <= 7)
   goto fail_toobig;

I think Torvalds' rant was entirely justified, and that makes him a "good boss". A "bad boss" would have looked the other way and allowed that crap to take root and grow.


5 posted on 11/12/2015 6:57:32 AM PST by so_real ( "The Congress of the United States recommends and approves the Holy Bible for use in all schools.")
[ Post Reply | Private Reply | To 1 | View Replies ]


To: so_real

Agreed.

“Tough but fair” used to be the ideal not the malady.


6 posted on 11/12/2015 7:03:28 AM PST by Bogey78O (We had a good run. Coulda been great still.)
[ Post Reply | Private Reply | To 5 | View Replies ]

To: so_real

Magic numbers aside, I’m confused about how adding a “goto” to C++ code is an “improvement.”


7 posted on 11/12/2015 7:06:12 AM PST by Steely Tom (Vote GOP: A Slower Handbasket)
[ Post Reply | Private Reply | To 5 | View Replies ]

To: so_real

Looking at the example given, I agree. Why be “nice” about it. Blunt saves time and effort.

I HATE people that write that kind of garbage to make themselves look smart and also to make themselves the only ones that can maintain the code.


14 posted on 11/12/2015 7:19:42 AM PST by glorgau
[ Post Reply | Private Reply | To 5 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson