[libdvdnav-devel] [PATCH 31/33] Don't reassign variable that is already set in loop
Jean-Baptiste Kempf
jb at videolan.org
Wed Jan 21 17:31:45 CET 2015
On 15 Jan, beandog at gentoo.org wrote :
> From: Steve Dibb <steve.dibb at gmail.com>
>
> ---
> src/ifo_read.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/ifo_read.c b/src/ifo_read.c
> index a6f70a0..38ab6dc 100644
> --- a/src/ifo_read.c
> +++ b/src/ifo_read.c
> @@ -2076,11 +2076,11 @@ int ifoRead_PGCI_UT(ifo_handle_t *ifofile) {
> }
> pgci_ut->lu[i].pgcit = calloc(1, sizeof(pgcit_t));
> if(!pgci_ut->lu[i].pgcit) {
> - unsigned int j;
> + unsigned int j, k;
> for(j = 0; j < i; j++) {
> if(pgci_ut->lu[j].pgcit->pgci_srp) {
> - for(i = 0; i < pgci_ut->lu[j].pgcit->nr_of_pgci_srp; i++) {
> - ifoFree_PGC(pgci_ut->lu[j].pgcit->pgci_srp[i].pgc);
> + for(k = 0; i < pgci_ut->lu[j].pgcit->nr_of_pgci_srp; k++) {
Is the second argument of the for OK?
Not k < ?
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the libdvdnav-devel
mailing list