[MPlayer-dev-eng] Re: [PATCH] Development (Was: Clean up demuxers)

Falk Hueffner falk.hueffner at student.uni-tuebingen.de
Wed Feb 27 16:46:34 CET 2002


Arpi <arpi at thot.banki.hu> writes:

> >   if(! IS_RUNNING(config)) {
> >     if(strcasecmp(opt,"vcd") == 0) {
> >       char* s;
> >       if(!param)
> >         return ERR_MISSING_PARAM;
> >       s = (char*)malloc((strlen(param) + 6 + 1)*sizeof(char));
> >       sprintf(s,"vcd://%s",param);
> >       entry = play_tree_new();
> >       play_tree_add_file(entry,s);
> >       free(s);
> >     } else if(strcasecmp(opt,"dvd") == 0) {
> > 
> > is a punishable offense in a few countries. If you cannot accept cleanup
> 
> what's the problem with this? it is not my code, anyway it looks ok for me.

The multiplication with sizeof(char) is redundant. Since sizeof(char)
is the base unit for sizeof(), it must always be 1 ;) (OK, actually, I
also can't see the problem...)

        Falk




More information about the MPlayer-dev-eng mailing list