[MPlayer-cvslog] r33001 - trunk/gui/bitmap.c
ib
subversion at mplayerhq.hu
Wed Mar 2 18:30:14 CET 2011
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.)
Modified:
trunk/gui/bitmap.c
Modified: trunk/gui/bitmap.c
==============================================================================
--- trunk/gui/bitmap.c Wed Mar 2 18:17:19 2011 (r33000)
+++ trunk/gui/bitmap.c Wed Mar 2 18:30:14 2011 (r33001)
@@ -155,10 +155,9 @@ static void Normalize(txSample *bf)
#endif
}
-static unsigned char tmp[512];
-
static unsigned char *fExist(unsigned char *fname)
{
+ static unsigned char tmp[512];
FILE *fl;
unsigned char ext[][6] = { ".png\0", ".PNG\0" };
int i;
@@ -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]);
fl = fopen(tmp, "rb");
if (fl != NULL) {
More information about the MPlayer-cvslog
mailing list