[syslinux] rosh patch V2
H. Peter Anvin
hpa at zytor.com
Sat Mar 7 21:48:34 PST 2009
Keith Schincke wrote:
> Here is a second version of my patch from last night.
>
> It uses the provided ctype function isspace and does the same readdir().
> I remove the rosh_issp() function. I admit to being a bit liberal with my
> use of braces and spaces.
>
> - de = readdir(d);
> - while (de != NULL) {
> + while ( de = readdir(d) ) {
> filepos++;
Stylistic note: it is stylistically considered appropriate to put an
extra set of parens around an assignment used in the context of a
boolean expression. gcc will warn if you don't. This thus should be:
while ( (de = readdir(d)) ) {
filepos++;
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the Syslinux
mailing list