use qemu_opts_create_nofail

We will use qemu_opts_create_nofail function, it can make code
more readable.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Dong Xu Wang 2012-12-06 14:47:22 +08:00 committed by Kevin Wolf
parent dd39244978
commit e478b448d7
6 changed files with 18 additions and 20 deletions

View file

@ -66,7 +66,7 @@ int select_watchdog(const char *p)
QLIST_FOREACH(model, &watchdog_list, entry) {
if (strcasecmp(model->wdt_name, p) == 0) {
/* add the device */
opts = qemu_opts_create(qemu_find_opts("device"), NULL, 0, NULL);
opts = qemu_opts_create_nofail(qemu_find_opts("device"));
qemu_opt_set(opts, "driver", p);
return 0;
}