[vlc-commits] misc/picture: narrow scope of iteration variables
Filip Roséen
git at videolan.org
Mon Oct 10 18:43:44 CEST 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Oct 10 18:18:01 2016 +0200| [fbbbcc62bd2eebb60ac662b753d7afde3a0e2d21] | committer: Thomas Guillem
misc/picture: narrow scope of iteration variables
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fbbbcc62bd2eebb60ac662b753d7afde3a0e2d21
---
src/misc/picture.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/misc/picture.c b/src/misc/picture.c
index 0cdbd0e..43207ce 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -342,12 +342,11 @@ void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src )
/* We need to proceed line by line */
uint8_t *p_in = p_src->p_pixels;
uint8_t *p_out = p_dst->p_pixels;
- int i_line;
assert( p_in );
assert( p_out );
- for( i_line = i_height; i_line--; )
+ for( int i_line = i_height; i_line--; )
{
memcpy( p_out, p_in, i_width );
p_in += p_src->i_pitch;
@@ -368,9 +367,7 @@ void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src )
void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src )
{
- int i;
-
- for( i = 0; i < p_src->i_planes ; i++ )
+ for( int i = 0; i < p_src->i_planes ; i++ )
plane_CopyPixels( p_dst->p+i, p_src->p+i );
}
More information about the vlc-commits
mailing list