]> Git Repo - qemu.git/blobdiff - vl.c
memory: Lazy init name from QOM name as needed
[qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index a8029d59d7d135c5fd1d0186eb7dab5d36d73576..b796c67e9d7fb6774a5f1b26b52a8711b45f1651 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1154,7 +1154,7 @@ static int drive_init_func(QemuOpts *opts, void *opaque)
 
 static int drive_enable_snapshot(QemuOpts *opts, void *opaque)
 {
-    if (NULL == qemu_opt_get(opts, "snapshot")) {
+    if (qemu_opt_get(opts, "snapshot") == NULL) {
         qemu_opt_set(opts, "snapshot", "on");
     }
     return 0;
@@ -2506,8 +2506,9 @@ static int foreach_device_config(int type, int (*func)(const char *cmdline))
         loc_push_restore(&conf->loc);
         rc = func(conf->cmdline);
         loc_pop(&conf->loc);
-        if (0 != rc)
+        if (rc) {
             return rc;
+        }
     }
     return 0;
 }
@@ -2917,6 +2918,7 @@ out:
     g_free(dummy);
     if (err) {
         qerror_report_err(err);
+        error_free(err);
         return -1;
     }
     return 0;
This page took 0.023846 seconds and 4 git commands to generate.