[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Reduce code duplication in virFileMakePath(Helper)
- From: Matthias Bolte <matthias bolte googlemail com>
- To: Eric Blake <eblake redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Reduce code duplication in virFileMakePath(Helper)
- Date: Wed, 6 Jul 2011 16:04:22 +0200
2011/7/6 Eric Blake <eblake redhat com>:
> 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.
Removed that line and pushed, thanks.
--
Matthias Bolte
http://photron.blogspot.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]