[libvirt] [PATCH v2] util: Fix typoes on return value and comments

Osier Yang jyang at redhat.com
Wed Jul 25 09:57:21 UTC 2012


On 2012年07月25日 17:49, Guannan Ren wrote:
> virNetDevTapCreateInBridgePort: Fix return value to -1
> virNetDevTapCreate: Fix comments
> ---
>   src/util/virnetdevtap.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
> index 6ccc380..192d180 100644
> --- a/src/util/virnetdevtap.c
> +++ b/src/util/virnetdevtap.c
> @@ -121,7 +121,7 @@ virNetDevProbeVnetHdr(int tapfd)
>    * persistent and closed. The caller must use virNetDevTapDelete to
>    * remove a persistent TAP devices when it is no longer needed.
>    *
> - * Returns 0 in case of success or an errno code in case of failure.
> + * Returns 0 in case of success or -1 on failure.
>    */
>   int virNetDevTapCreate(char **ifname,
>                          int *tapfd,
> @@ -341,5 +341,5 @@ int virNetDevTapCreateInBridgePort(const char *brname,
>       if (tapfd)
>           VIR_FORCE_CLOSE(*tapfd);
>
> -    return errno;
> +    return -1;
>   }

ACK.




More information about the libvir-list mailing list