[PATCH] storage: avoid missing break in default branch of switch statement

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

 



Detected by Coverity.

* src/storage/storage_backend.c: avoid missing break in default branch.

https://bugzilla.redhat.com/show_bug.cgi?id=721335

Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
---
 src/storage/storage_backend.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 6243d1e..004bc66 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -819,6 +819,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
             virCommandAddArgFormat(cmd, "%lluK", size_arg);
             if (do_encryption)
                 virCommandAddArg(cmd, "-e");
+            break;
         }
     } else {
         virCommandAddArgList(cmd, "create", "-f", type,
-- 
1.7.1

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