[MPlayer-dev-eng] [PATCH] Make use of mp_basename in a few places

Clément Bœsch ubitux at gmail.com
Sat Dec 4 11:25:42 CET 2010


On Sat, Dec 04, 2010 at 11:17:05AM +0100, Reimar Döffinger wrote:
> On Sat, Dec 04, 2010 at 12:05:38AM +0100, Clément Bœsch wrote:
> > @@ -95,11 +96,7 @@ static rar_stream_t *rar_open(const char *const filename,
> >              strcat(rar_filename, ".rar");
> >          }
> >          /* get rid of the path if there is any */
> > -        if ((p = strrchr(filename, '/')) == NULL) {
> > -            p = filename;
> > -        } else {
> > -            p++;
> > -        }
> > +        p = (char *)mp_basename(filename);
> 
> Huh? p is already const char *, this cast should be pointless.

Oups, fixed.

> Apart from that, considering that most of those implementations
> you are replacing are buggy I'd say go ahead, can't break already
> broken code that much.

Thanks, applied.

-- 
Clément B.
Not sent from a jesusPhone.


More information about the MPlayer-dev-eng mailing list