[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2] 9pfs-local: simplify/optimize local_mapped_a

From: Aneesh Kumar K.V
Subject: Re: [Qemu-devel] [PATCH v2] 9pfs-local: simplify/optimize local_mapped_attr_path()
Date: Thu, 12 Mar 2015 15:23:55 +0530
User-agent: Notmuch/0.19+30~gd241a48 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

Michael Tokarev <address@hidden> 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 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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]