[libvirt] [PATCH] util: fix a typo on return value

Osier Yang jyang at redhat.com
Wed Jul 25 09:26:04 UTC 2012


On 2012年07月25日 17:22, Guannan Ren wrote:
> On 07/25/2012 05:17 PM, Osier Yang wrote:
>> On 2012年07月25日 17:02, Guannan Ren wrote:
>>> virNetDevTapCreateInBridgePort
>>> returns 0 in case of success or -1 on failure
>>> ---
>>> src/util/virnetdevtap.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
>>> index 6ccc380..83f2ecd 100644
>>> --- a/src/util/virnetdevtap.c
>>> +++ b/src/util/virnetdevtap.c
>>> @@ -341,5 +341,5 @@ int virNetDevTapCreateInBridgePort(const char
>>> *brname,
>>> if (tapfd)
>>> VIR_FORCE_CLOSE(*tapfd);
>>>
>>> - return errno;
>>> + return -1;
>>> }
>>
>> You might want to fix the comment for virNetDevTapCreate
>> together.
>>
>> <...>
>> Returns 0 in case of success or an errno code in case of failure.
>> </...>
>>
>> Regards,
>> Osier
>
> it should return -1 instead of errno on error, the comment is right.
>

No, I'm talking about another function virNetDevTapCreate in
the util/virnetdevtap.c





More information about the libvir-list mailing list