Mercurial > libdvdread4.hg
changeset 74:133be2fe0eef src
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 <fmarchal AT perso DOT be> changes all of
places were ptl_mait is used in ifo_read.c. Thanks!
author | erik |
---|---|
date | Fri, 07 Oct 2011 16:56:02 +0000 |
parents | 933bbcf89338 |
children | 8e12b8e01713 |
files | ifo_read.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }