Hi guys, interesting anecdote from Pat, but:

>      But in given case (`break' after `return_user()') there are _no_
> untested code, and return_user() doesn't returns back to switch in
> inthndlr.c unconditionally. So, `break' there is _really_ not need...

The whole point is that if you remove the break; completely, then
somebody who later reads or changes the code might be mislead into
thinking that the code SHOULD fall through after the return_user,
or that it would be OKAY to fall through - in both cases, he will
either not UNDERSTAND the code properly or will even add BUGS by
erroneously adding the possibility of returning to the caller to
return_user().

So: OKAY, remove break; if you want, BUT add a comment instead of the
break;, to let people know that return_user() never returns. You should
even add such a comment to return_user() itself actually.

By the way, you probably save even more bytes - and a bit of stack
space - by using an evil GOTO for the return_user(), unless it already
is an inlined macro or similar already anyway.

OLD: break;
BAD: (nothing)
BETTER: /* return_user never returns, no break needed */
EVIL: use goto instead of call for return_user ;-).

Eric

PS: Which kernels contain the DOSLFN compatibility patch (improved
xBPB/DPB initialization and set extended error code implemented),
did somebody contact GRUB people about 0.0.35 vs. 1.0.35 version ID,
does anybody remember why FreeCOM has "if XMS swap version, then
disable LOADFIX" in #if, and why old CATS of HTMLHELP required LOADFIX
to work with DOS=HIGH (I seem to remember that recompiling with either
Toms or my KITTEN version or recompiling ZLIB or both was what Bob did
to fix the bug... maybe there are OTHER programs with CATS affected?
Which programs still use CATS instead of KITTEN? Symptom was a CRASH
when using HTMLHELP several times on SOME systems if DOS=HIGH...) ...?
And did Arkady re-add the seemingly but not actually unneeded BPB/...
initialization at boot time which he had removed at some point?



-------------------------------------------------------
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