[libdvdnav-devel] [PATCH 26/33] Remove unnecessary memset() calls because of calloc being used

beandog at gentoo.org beandog at gentoo.org
Thu Jan 15 21:45:38 CET 2015


From: Steve Dibb <steve.dibb at gmail.com>

---
 src/ifo_read.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/ifo_read.c b/src/ifo_read.c
index d6ec6b2..a6f70a0 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -807,8 +807,6 @@ static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile,
                                    pgc_command_tbl_t *cmd_tbl,
                                    unsigned int offset) {
 
-  memset(cmd_tbl, 0, sizeof(pgc_command_tbl_t));
-
   if(!DVDFileSeek_(ifofile->file, offset))
     return 0;
 
@@ -1451,7 +1449,6 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) {
       ifofile->ptl_mait = NULL;
       return 0;
     }
-    memset(pf_temp, 0, info_length);
     if(!(DVDReadBytes(ifofile->file, pf_temp, info_length))) {
       fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table at index %d.\n",i);
       free(pf_temp);
@@ -1562,8 +1559,6 @@ int ifoRead_VTS_TMAPT(ifo_handle_t *ifofile) {
     return 0;
   }
 
-  memset(vts_tmapt->tmap, 0, info_length); /* So ifoFree_VTS_TMAPT works. */
-
   for(i = 0; i < vts_tmapt->nr_of_tmaps; i++) {
     if(!DVDFileSeek_(ifofile->file, offset + vts_tmap_srp[i])) {
       ifoFree_VTS_TMAPT(ifofile);
-- 
2.0.4



More information about the libdvdnav-devel mailing list