[libvirt] [patch] initialize a local variable in qemudOpenMonitorUnix()

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

 



This patch initializes a local variable in qemudOpenMonitorUnix(),
thus also eliminates a compilation warning.





diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 00dc6e5..d2db1a2 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -874,7 +874,7 @@ qemudOpenMonitorUnix(virConnectPtr conn,
     struct sockaddr_un addr;
     int monfd;
     int timeout = 3; /* In seconds */
-    int ret, i;
+    int ret, i = 0;

     if ((monfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
         virReportSystemError(conn, errno,

--
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]