On 07/06/2011 07:47 AM, Matthias Bolte wrote:
> Move stat and mkdir to virFileMakePathHelper.
> 
> Also use the stat result to detect whether the existing path
> is a directory and set errno accordingly if it's not.
> ---
>  src/util/util.c |   44 ++++++++++++++------------------------------
>  1 files changed, 14 insertions(+), 30 deletions(-)

ACK with one nit:

> -    if ((parent = strdup(path)) == NULL) {
> +    if ((tmp = strdup(path)) == NULL) {
>          errno = ENOMEM;

strdup() already sets errno to ENOMEM on failure, so this line can be
deleted.

-- 
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to