[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 6/8] spice: don't use 'Yoda conditions'
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v4 6/8] spice: don't use 'Yoda conditions' |
Date: |
Mon, 4 Aug 2014 17:19:50 +0800 |
From: Gonglei <address@hidden>
imitate nearby code about using '!value' or 'value == NULL'
Signed-off-by: Gonglei <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.12.4
- [Qemu-devel] [PATCH v4 0/8] don't use Yoda conditions, arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 7/8] vl: don't use 'Yoda conditions', arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 8/8] vmxnet3: don't use 'Yoda conditions', arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 3/8] audio: don't use 'Yoda conditions', arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 5/8] don't use 'Yoda conditions', arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 2/8] usb: don't use 'Yoda conditions', arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 6/8] spice: don't use 'Yoda conditions',
arei.gonglei <=
- [Qemu-devel] [PATCH v4 4/8] isa-bus: don't use 'Yoda conditions', arei.gonglei, 2014/08/04
- [Qemu-devel] [PATCH v4 1/8] CODING_STYLE: Section about conditional statement, arei.gonglei, 2014/08/04
- Re: [Qemu-devel] [PATCH v4 0/8] don't use Yoda conditions, Eric Blake, 2014/08/05