[MPlayer-cvslog] r33001 - trunk/gui/bitmap.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 2 19:40:24 CET 2011


On Wed, Mar 02, 2011 at 06:30:14PM +0100, ib wrote:
> Author: ib
> Date: Wed Mar  2 18:30:14 2011
> New Revision: 33001
> 
> Log:
> Move declaration of char array into scope of fExist() where it's used.
> 
> (Besides, replace constant for size by sizeof expression.)

Actually,

> +    static unsigned char tmp[512];
> @@ -171,7 +170,7 @@ static unsigned char *fExist(unsigned ch
>      }
>  
>      for (i = 0; i < 2; i++) {
> -        snprintf(tmp, 511, "%s%s", fname, ext[i]);
> +        snprintf(tmp, sizeof(tmp), "%s%s", fname, ext[i]);

You end up also changing the value.
You should mention such things since that saves me the time of
asking: Did you notice that and did you check it does not cause issues
(I am quite certain it doesn't in this case though).


More information about the MPlayer-cvslog mailing list