[syslinux] rosh patch

Jeffrey Hutzelman jhutz at cmu.edu
Fri Mar 6 09:12:45 PST 2009


--On Friday, March 06, 2009 06:27:04 AM -0600 Keith Schincke 
<keith.schincke at gmail.com> wrote:

> For the first change, I replaced switch statement with a if statement. The
> switch only tested for two possibilities (a space or a tab) and had only
> outcome (rv=1;). A switch would be more suitable if there were more tests
> and more outcomes.
>
> For the second change, I replaced a double call to readdidr() with a
> single call. There was a call to readdir() before the while statement and
> then one at the bottom. By moving the call in the test of the while, I
> reduced the number of locations the function is called and show what will
> cause the de pointer to be NULL.
>
> These are not ground breaking changes but simple cleanups.

In other words, they are gratuitous changes.
They don't improve performance or correctness.
They don't even make the code more "clean".
All they do is make it agree with some arbitrary coding style.

> APUE is the "Advanced Programming in the Unix Environment" book. A long
> name for a heavy and well used book.

And this has what to do with the patch?

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+ at cmu.edu>
   Carnegie Mellon University - Pittsburgh, PA




More information about the Syslinux mailing list