]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Fix typoes on return value and comments
authorGuannan Ren <gren@redhat.com>
Wed, 25 Jul 2012 09:43:18 +0000 (17:43 +0800)
committerGuannan Ren <gren@redhat.com>
Wed, 25 Jul 2012 10:05:38 +0000 (18:05 +0800)
virNetDevTapCreateInBridgePort: Fix return value to -1
virNetDevTapCreate: Fix comments

src/util/virnetdevtap.c

index 6ccc380e8905aec6b15692feb9b49e072184ac13..192d180ecb59c37be43d0b0ef3a82d7f7b3fc306 100644 (file)
@@ -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;
 }