[MPlayer-dev-eng] [PATCH] Filename double-conversion

Rich Felker dalias at aerifal.cx
Mon Oct 30 19:30:33 CET 2006


On Mon, Oct 30, 2006 at 04:24:45PM +0100, Reimar Döffinger wrote:
> Hello,
> On Mon, Oct 30, 2006 at 09:36:28AM +0800, Zuxy Meng wrote:
> >  static iconv_t msgiconv;
> > +static iconv_t inv_msgiconv = (iconv_t)(-1);
> > +static char recoded_filename[MAX_PATH];
> >  #endif
> 
> Since they are only used there, IMHO move them into the function (of
> course the static must stay).
> 
> > +const char* filename_recode(char* filename)
> 
> Why is the parameter not const?
> 
> > +    iconv(inv_msgiconv, (const char**)&filename, &filename_len,
> 
> That cast seems useless to me, esp. if you change the parameter to
> const.

Agree with all of Reimar's comments. Otherwise it seems good now!

Rich




More information about the MPlayer-dev-eng mailing list