[MPlayer-cvslog] r19075 - in trunk: libmpdemux/realrtsp/real.c libmpdemux/realrtsp/rmff.c libmpdemux/realrtsp/sdpplin.c vobsub.c

Rich Felker dalias at aerifal.cx
Fri Jul 14 19:40:39 CEST 2006


On Fri, Jul 14, 2006 at 12:31:52PM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Fri, Jul 14, 2006 at 01:30:39AM -0400, Rich Felker wrote:
> > On Fri, Jul 14, 2006 at 12:12:24AM +0200, reynaldo wrote:
> > > Author: reynaldo
> > > Date: Fri Jul 14 00:11:47 2006
> > > New Revision: 19075
> > > 
> > > Modified:
> > >    trunk/libmpdemux/realrtsp/real.c
> > >    trunk/libmpdemux/realrtsp/rmff.c
> > >    trunk/libmpdemux/realrtsp/sdpplin.c
> > >    trunk/vobsub.c
> > > 
> > > Log:
> > > more sizeof(char) fun
> > > 
> > > Modified: trunk/libmpdemux/realrtsp/real.c
> > > ==============================================================================
> > > --- trunk/libmpdemux/realrtsp/real.c	(original)
> > > +++ trunk/libmpdemux/realrtsp/real.c	Fri Jul 14 00:11:47 2006
> > > @@ -767,7 +767,7 @@
> > >    printf("real: Stream description size: %u\n", size);
> > >  #endif
> > >  
> > > -  description=malloc(sizeof(char)*(size+1));
> > > +  description=malloc((size+1));
> > 
> > Extra leftover parentheses... it would have been nice to clean them up
> > at the same time.. Same on all of these..
> 
> cant we add a few checks to the pre-commit script so that such things
> cannot be commited by misstake (yes i definitly want that for ffmpeg if
> anyone is bored ...)
> 
> some ideas:
> doubble parentheses, *1, +0, && 1, || 0, (blah*)malloc(), x = x + ..., 
> x = x * ..., [(...)]

some can be checked by regex, but not double parentheses.
it might make more sense to submit a patch to allow such things to be
gcc warnings (if enabled) instead of doing it at commit time, since it
could help other projects too.

rich




More information about the MPlayer-cvslog mailing list