r1238 - trunk/libdvdread/src/ifo_read.c
Author: erik Date: Fri Oct 7 18:56:02 2011 New Revision: 1238 Log: 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! Modified: trunk/libdvdread/src/ifo_read.c Modified: trunk/libdvdread/src/ifo_read.c ============================================================================== --- trunk/libdvdread/src/ifo_read.c Thu Oct 6 23:02:00 2011 (r1237) +++ trunk/libdvdread/src/ifo_read.c Fri Oct 7 18:56:02 2011 (r1238) @@ -1291,7 +1291,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofi 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 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofi 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 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofi 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 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofi 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 @@ void ifoFree_PTL_MAIT(ifo_handle_t *ifof } free(ifofile->ptl_mait->countries); free(ifofile->ptl_mait); - ifofile->ptl_mait = 0; + ifofile->ptl_mait = NULL; } }
participants (1)
-
erik