[syslinux] rosh patch

Keith Schincke keith.schincke at gmail.com
Fri Mar 6 04:27:04 PST 2009


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.

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

Let me know if you have any questions.

Keith


On Fri, Mar 6, 2009 at 12:07 AM, H. Peter Anvin <hpa at zytor.com> wrote:

> Keith Schincke wrote:
> > Hey Guys,
> >
> > Below is a patch for the com32/rosh/rosh.c from tonights syslinx git.
> > The patch does the following:
> >   1) changes the rosh_issp to use an if instead of a case for this simple
> > test.
> >   2) changes the rosh_dir_arg function to move the readdir() to inside
> the
> > while test.
> >
> > This will let me go through my APUE book.
> >
> > Let me know if you have any questions.
> >
>
> You're saying WHAT you're proposing, but not WHY you're proposing it.
> Also, what is an "APUE book"?
>
>        -hpa
>
> --
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
>
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>



More information about the Syslinux mailing list