On Thursday 27 September 2007 00:26, Yuichi Nakamura wrote:
> > >                         file_sep = strrchr(tmp_path, '/');
> > >                         if (file_sep == tmp_path) {
> > >                                 file_sep++;
> > > -                               p[0] = '\0';
> > > +                               path[0] = '\0';
> > >                                 p = path;
> > >                         } else if (file_sep) {
> > >                                 *file_sep++ = '\0';
> > >  
> > > 
> > > It should be shorter.
> > I agree, please apply this.
> I was wrong...
> 
> p should also point to path.

It is. There is "p = path;"

> So, this patch does not work.
> Please apply original one, below.

>                               file_sep++;
> -                             p[0] = '\0';
> -                             p = path;
> +                             p = strcpy(path, "");

"store NUL in path[0], then copy path to p".

It is equivalent to:   path[0] = '\0'; p = path;
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to