aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2015-03-12 09:52:30 +0300
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2015-03-12 15:23:05 +0530
commit1b6f85e2cb9302a8587772d04983a3ecc0ecfe68 (patch)
treeef3420a66ae482572bf0711a03e9e7aeabc6f319 /util
parentee74801035b0b5f1fdfd4e31d3a53f511f91c804 (diff)
downloadqemu-1b6f85e2cb9302a8587772d04983a3ecc0ecfe68.zip
qemu-1b6f85e2cb9302a8587772d04983a3ecc0ecfe68.tar.gz
qemu-1b6f85e2cb9302a8587772d04983a3ecc0ecfe68.tar.bz2
9pfs-local: simplify/optimize local_mapped_attr_path()
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 consistent result. This also makes sure the function will do the right thing in corner cases (eg, empty pathname is given), when basename(3) return entirely another string. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions