[libvirt] [PATCH 1/2] qemuBuildRNGBackendChrdevStr: Fix formatting

Michal Privoznik posted 2 patches 7 years, 2 months ago
There is a newer version of this series
[libvirt] [PATCH 1/2] qemuBuildRNGBackendChrdevStr: Fix formatting
Posted by Michal Privoznik 7 years, 2 months ago
The way that the code is currently written makes my eyes hurt.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_command.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b7a548c68c..32ed83f277 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5763,10 +5763,12 @@ qemuBuildRNGBackendChrdevStr(virLogManagerPtr logManager,
 {
     unsigned int cdevflags = QEMU_BUILD_CHARDEV_TCP_NOWAIT |
         QEMU_BUILD_CHARDEV_UNIX_FD_PASS;
-    if (chardevStdioLogd)
-        cdevflags |= QEMU_BUILD_CHARDEV_FILE_LOGD;
+
     *chr = NULL;
 
+    if (chardevStdioLogd)
+        cdevflags |= QEMU_BUILD_CHARDEV_FILE_LOGD;
+
     switch ((virDomainRNGBackend) rng->backend) {
     case VIR_DOMAIN_RNG_BACKEND_RANDOM:
     case VIR_DOMAIN_RNG_BACKEND_LAST:
-- 
2.19.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] qemuBuildRNGBackendChrdevStr: Fix formatting
Posted by Ján Tomko 7 years, 2 months ago
On Tue, Dec 04, 2018 at 02:39:29PM +0100, Michal Privoznik wrote:
>The way that the code is currently written makes my eyes hurt.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> src/qemu/qemu_command.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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