Re: [Qemu-devel] [PATCH v2] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-12 Thread Aneesh Kumar K.V
Michael Tokarev writes: > Omit one unnecessary memory allocation for components > of the path and create the resulting path directly given > lengths of the components. > > Do not use basename(3) because there are 2 versions of > this function which differs when argument ends with > slash characte

[Qemu-devel] [PATCH v2] 9pfs-local: simplify/optimize local_mapped_attr_path()

2015-03-11 Thread Michael Tokarev
Omit one unnecessary memory allocation for components of the path and create the resulting path directly given lengths of the components. Do not use basename(3) because there are 2 versions of this function which differs when argument ends with slash character, use strrchr() instead so we have con