Hi Arkady,

The "-" in the diff says that the break is removed entirely. Did you actually mean this, given your reply?

I think you do save 2 or 3 bytes per break, depending on the compiler. However, I can relate to you an amusing experience. At one time, I did some consulting for Bell Labs. A few years after I left, AT&T had a major network failure in the northeast US. A friend who was still with AT&T told me that the failure was the result of a hardware problem that took the code into an untested branch of code. It was a function call inside a case that should have never returned and had no break at the end. The code fell into the next case and the system fell like a set dominoes.

I'm not maintaining the kernel, so just my $0.02 -- which is worth less in Euros ;-)

Pat


Arkady V.Belousov wrote:

Hi!

5-Янв-2005 08:30 [EMAIL PROTECTED] (Pat Villani) wrote to
freedos-kernel@lists.sourceforge.net:



+++ inthndlr.c 31 Dec 2004 12:46:21 -0000 1.87.2.13
return_user();
- break;


I think, for readability purposes (to make understanding by new
developers easier) `break' should be remained as comment. Something like:
/* return_user() never returns, so "break" not need */


PV> That's really bad practice.  The reason that it's there is so if, by
PV> reason of a bug or hardware failure of any sort, return_user() does
PV> really return, you will have bug that will be a nightmare to find.

    No, I say not this (that `break' should be present): I say, that new
kernel developer may not know (yet) that return_user() never returns, so
[s]he may wonder, why there is no `break' and why this is not a bug. So,
commenting this trick may ease the understanding of this code.

PV> For the savings of less than 10 bytes, it's not worth the risk.

    BTW, `break' here really (may) save some bytes, because tails merging.




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel






-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to