[MPlayer-cvslog] r35452 - trunk/gui/util/bitmap.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Nov 25 17:38:41 CET 2012


On Sun, Nov 25, 2012 at 05:31:38PM +0100, Erik Auerswald wrote:
> Hi,
> 
> On Fri, Nov 23, 2012 at 11:15:43AM +0100, ib wrote:
> > Author: ib
> > Date: Fri Nov 23 11:15:43 2012
> > New Revision: 35452
> > 
> > Log:
> > Don't use signed variable for file length.
> > 
> > Modified:
> >    trunk/gui/util/bitmap.c
> > 
> > Modified: trunk/gui/util/bitmap.c
> > ==============================================================================
> > --- trunk/gui/util/bitmap.c	Fri Nov 23 11:04:26 2012	(r35451)
> > +++ trunk/gui/util/bitmap.c	Fri Nov 23 11:15:43 2012	(r35452)
> > @@ -47,7 +47,7 @@
> >  static int pngRead(const char *fname, guiImage *img)
> >  {
> >      FILE *file;
> > -    long len;
> > +    size_t len;
> 
> Shouldn't this be off_t? I don't think it really matters, but off_t feels
> more correct.

Note: it generally is best to just use uint64_t, since getting off_t to
be 64 bit on e.g. Windows is rather difficult, while replacing the functions
with ones that work with a 64 bit offset is easy.
Generally system-dependent types like off_t and size_t are better
avoided wherever possible.


More information about the MPlayer-cvslog mailing list