[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New versions of openbsd_{basename,dirname}.c



Svante Signell, le Tue 17 Jan 2012 15:21:01 +0100, a écrit :
> basename is only called in two functions:
> 1) main.c: progname = basename(argv[0]);
> 2) lib/handle.c:tar_{open,fdopen}():tar_init():path_hashfunc();
> lib/util.c:path_hashfunc():p = basename(buf);

Ok for that.

> The dirname calls are all in lib/extract.c of the form: (7 functions)
> if (mkdirhier(dirname(filename)) == -1)
> so there optimization might be of use. Is it really worth the effort?

That'll be done for each and every file of the archive, so I'd say yes.

Samuel


Reply to: