[MPlayer-dev-eng] [PATCH] de-templatize TV new_handle function

Diego Biurrun diego at biurrun.de
Mon Sep 13 16:58:36 CEST 2010


On Sun, Sep 12, 2010 at 04:06:04PM +0200, Reimar Döffinger wrote:
> On Sun, Sep 12, 2010 at 01:52:03PM +0200, Diego Biurrun wrote:
> > +tvi_handle_t *tv_new_handle(const size_t size,
> 
> What's that const supposed to be good for?

The function parameter is not changed so I figured it would not hurt..

> > +    h->priv = malloc(size);
> > +    if (!h->priv) {
> > +        free(h);
> > +        return NULL;
> > +    }
> > +    memset(h->priv, 0, size);
> 
> Merge these two into calloc while we change this function anyway.

Committed separately.

Diego


More information about the MPlayer-dev-eng mailing list