[libvirt] [PATCH] Fix statement not reached compiler error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# HG changeset patch
# User john.levon@xxxxxxx
# Date 1229369745 28800
# Node ID 2bee618a0557131c383b124b2b88bd407b462df4
# Parent  16ceb6f2e00c4639e97440723e57ec0be6d12cd9
Fix statement not reached compiler error

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/src/remote_internal.c b/src/remote_internal.c
--- a/src/remote_internal.c
+++ b/src/remote_internal.c
@@ -5091,25 +5091,23 @@ really_read_buf (virConnectPtr conn, str
             return -1;
         }
         return err;
-    } else {
-    reread:
-        err = recv (priv->sock, bytes, len, 0);
-        if (err == -1) {
-            if (errno == EINTR)
-                goto reread;
-            error (in_open ? NULL : conn,
-                   VIR_ERR_SYSTEM_ERROR, strerror (errno));
-            return -1;
-        }
-        if (err == 0) {
-            error (in_open ? NULL : conn,
-                   VIR_ERR_RPC, _("socket closed unexpectedly"));
-            return -1;
-        }
-        return err;
-    }
-
-    return 0;
+    }
+
+reread:
+    err = recv (priv->sock, bytes, len, 0);
+    if (err == -1) {
+        if (errno == EINTR)
+            goto reread;
+        error (in_open ? NULL : conn,
+               VIR_ERR_SYSTEM_ERROR, strerror (errno));
+        return -1;
+    }
+    if (err == 0) {
+        error (in_open ? NULL : conn,
+               VIR_ERR_RPC, _("socket closed unexpectedly"));
+        return -1;
+    }
+    return err;
 }
 
 static int

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]