[DVDnav-discuss] please review: DVDFileStat, close dev on error, use parens and BSD porting bits

Erik Hovland erik at hovland.org
Mon Aug 31 09:08:57 CEST 2009


----- Original message -----
> On Sun, Aug 30, 2009 at 05:24:56PM -0700, Erik Hovland wrote:
> > I finally got my act together on the whoe dvdnav/dvdread svn write
> > access. So I am
> > asking for a last review before I commit these patches to the repo.
>
> Get rid of the trailing whitespace.

Will do.

>
> > --- a/src/dvd_reader.c
> > +++ b/src/dvd_reader.c
> > @@ -897,6 +903,187 @@ void DVDCloseFile( dvd_file_t *dvd_file )
>> > +  if( title == 0 ) {
> > +  if(!UDFFindFile( dvd, filename, &size )) {
> > +  if( !menu ) {
> > +    for( cur = 2; cur < 10; cur++ ) {
> > +      if( !UDFFindFile( dvd, filename, &size ) ) {
> > +  for(n = 0; n < nr_parts; n++) {
> > +  if( title == 0 ) {
> > +  if( !findDVDFile( dvd, filename, full_path ) ) {
> > +  if( stat( full_path, &fileinfo ) < 0 ) {
>
> Even within a single function you inconsistently format your statements.
> I suggest dropping the spaces within the parentheses.

In my defense, that inconsistency is pulled
straight from the 0.9.7 tree. I have no
problem being more rigid about the style. But it
will make it harder for others to diff the same trees and come up w/ the same comparisons. I
would prefer to fix the code style in a 2nd
patch.

E


More information about the DVDnav-discuss mailing list