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

Diego Biurrun diego at biurrun.de
Mon Aug 31 07:47:51 CEST 2009


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.

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

> +static int DVDFileStatVOBPath( dvd_reader_t *dvd, int title,
> +                                       int menu, dvd_stat_t *statbuf )

The indentation is off.

Diego


More information about the DVDnav-discuss mailing list