[libdvdnav-devel] src/ifo_read.c: Reduce the scope of some variables
Andrew Clayton
git at videolan.org
Fri Oct 24 16:29:24 CEST 2014
libdvdread | branch: master | Andrew Clayton <andrew at digital-domain.net> | Fri Oct 24 15:21:34 2014 +0100| [0b9e76358a85a9789d21e3cc603508db03dd899a] | committer: Jean-Baptiste Kempf
src/ifo_read.c: Reduce the scope of some variables
Signed-off-by: Andrew Clayton <andrew at digital-domain.net>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=0b9e76358a85a9789d21e3cc603508db03dd899a
---
src/ifo_read.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/ifo_read.c b/src/ifo_read.c
index 4659136..807ebac 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -1424,12 +1424,12 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) {
}
void ifoFree_PTL_MAIT(ifo_handle_t *ifofile) {
- unsigned int i;
-
if(!ifofile)
return;
if(ifofile->ptl_mait) {
+ unsigned int i;
+
for(i = 0; i < ifofile->ptl_mait->nr_of_countries; i++) {
free(ifofile->ptl_mait->countries[i].pf_ptl_mai);
}
@@ -1558,12 +1558,12 @@ int ifoRead_VTS_TMAPT(ifo_handle_t *ifofile) {
}
void ifoFree_VTS_TMAPT(ifo_handle_t *ifofile) {
- unsigned int i;
-
if(!ifofile)
return;
if(ifofile->vts_tmapt) {
+ unsigned int i;
+
for(i = 0; i < ifofile->vts_tmapt->nr_of_tmaps; i++)
if(ifofile->vts_tmapt->tmap[i].map_ent)
free(ifofile->vts_tmapt->tmap[i].map_ent);
@@ -2112,12 +2112,12 @@ int ifoRead_PGCI_UT(ifo_handle_t *ifofile) {
void ifoFree_PGCI_UT(ifo_handle_t *ifofile) {
- unsigned int i;
-
if(!ifofile)
return;
if(ifofile->pgci_ut) {
+ unsigned int i;
+
for(i = 0; i < ifofile->pgci_ut->nr_of_lus; i++) {
ifoFree_PGCIT_internal(&ifofile->pgci_ut->lu[i].pgcit);
}
More information about the libdvdnav-devel
mailing list