[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 11/20] spice: don't use 'Yoda conditions'
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 11/20] spice: don't use 'Yoda conditions' |
Date: |
Fri, 15 Aug 2014 19:15:02 +0400 |
From: Gonglei <address@hidden>
imitate nearby code about using '!value' or 'value == NULL'
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
ui/spice-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 7bb91e6..1a2fb4b 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -677,7 +677,7 @@ void qemu_spice_init(void)
if (tls_port) {
x509_dir = qemu_opt_get(opts, "x509-dir");
- if (NULL == x509_dir) {
+ if (!x509_dir) {
x509_dir = ".";
}
@@ -803,7 +803,7 @@ void qemu_spice_init(void)
seamless_migration = qemu_opt_get_bool(opts, "seamless-migration", 0);
spice_server_set_seamless_migration(spice_server, seamless_migration);
- if (0 != spice_server_init(spice_server, &core_interface)) {
+ if (spice_server_init(spice_server, &core_interface) != 0) {
error_report("failed to initialize spice server");
exit(1);
};
--
1.7.10.4
- [Qemu-trivial] [PULL 19/20] l2cap: fix access to freed memory, (continued)
- [Qemu-trivial] [PULL 19/20] l2cap: fix access to freed memory, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 16/20] ssi: xilinx_spi: Initialise CS GPIOs as NULL, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 14/20] qemu-options.hx: fix typo about l2tpv3, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 20/20] ivshmem: check the value returned by fstat(), Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 12/20] vl: don't use 'Yoda conditions', Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 04/20] pci-host: update obsolete reference about piix_pci.c, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 03/20] qemu-options.hx: fix a typo of chardev, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 10/20] don't use 'Yoda conditions', Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 05/20] pci-host: update uncorresponding description, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 09/20] isa-bus: don't use 'Yoda conditions', Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 11/20] spice: don't use 'Yoda conditions',
Michael Tokarev <=
- [Qemu-trivial] [PULL 15/20] vl: free err, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 18/20] intc: i8259: Convert Array allocation to g_new0, Michael Tokarev, 2014/08/15
- [Qemu-trivial] [PULL 17/20] ppc: convert g_new(qemu_irq usages to g_new0, Michael Tokarev, 2014/08/15
- Re: [Qemu-trivial] [Qemu-devel] [PULL 00/20] Trivial patches for 2014-08-15, Peter Maydell, 2014/08/18