# HG changeset patch # User erik # Date 1318006562 0 # Node ID 133be2fe0eefa6e3284608152cea28d7029a7982 # Parent 933bbcf893380e076820b0da7f27f564007f4cb5 Use NULL instead of 0 consistently. Since this is C and not C++, NULL is the stylistic choice for pointer assignments and checking. This patch, kindly submitted by Frederic Marchal changes all of places were ptl_mait is used in ifo_read.c. Thanks! diff -r 933bbcf89338 -r 133be2fe0eef ifo_read.c --- a/ifo_read.c Thu Oct 06 21:02:00 2011 +0000 +++ b/ifo_read.c Fri Oct 07 16:56:02 2011 +0000 @@ -1291,7 +1291,7 @@ if(!ifofile->vmgi_mat) return 0; - if(ifofile->vmgi_mat->ptl_mait == 0) + if(ifofile->vmgi_mat->ptl_mait == NULL) return 1; if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN)) @@ -1305,7 +1305,7 @@ if(!(DVDReadBytes(ifofile->file, ptl_mait, PTL_MAIT_SIZE))) { free(ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; return 0; } @@ -1324,7 +1324,7 @@ ptl_mait->countries = (ptl_mait_country_t *)malloc(info_length); if(!ptl_mait->countries) { free(ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; return 0; } for(i = 0; i < ptl_mait->nr_of_countries; i++) { @@ -1336,7 +1336,7 @@ fprintf(stderr, "libdvdread: Unable to read PTL_MAIT.\n"); free(ptl_mait->countries); free(ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; return 0; } } @@ -1415,7 +1415,7 @@ } free(ifofile->ptl_mait->countries); free(ifofile->ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; } }