]> Git Repo - qemu.git/commitdiff
spice: don't use 'Yoda conditions'
authorGonglei <[email protected]>
Mon, 11 Aug 2014 13:00:56 +0000 (21:00 +0800)
committerMichael Tokarev <[email protected]>
Fri, 15 Aug 2014 14:54:07 +0000 (18:54 +0400)
imitate nearby code about using '!value' or 'value == NULL'

Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
ui/spice-core.c

index 7bb91e6bada92215b62a40e7a81996f87c9be890..1a2fb4b2376fcb644bd16b50ca61e5dfb167a032 100644 (file)
@@ -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);
     };
This page took 0.027646 seconds and 4 git commands to generate.