summaryrefslogtreecommitdiff
path: root/hw/watchdog.c
diff options
context:
space:
mode:
authorDong Xu Wang <wdongxu@linux.vnet.ibm.com>2012-12-06 14:47:22 +0800
committerKevin Wolf <kwolf@redhat.com>2012-12-11 16:35:47 +0100
commite478b448d7c36046462733ffaeaea0961575790a (patch)
treea2b06f9ce8a74c39da739dbc16eca0a6be4eeb2e /hw/watchdog.c
parentdd39244978627e41a66b98d20eceddb1d7d25def (diff)
downloadqemu-e478b448d7c36046462733ffaeaea0961575790a.tar.gz
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>
Diffstat (limited to 'hw/watchdog.c')
-rw-r--r--hw/watchdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/watchdog.c b/hw/watchdog.c
index b52acedd98..5c82c17d09 100644
--- a/hw/watchdog.c
+++ b/hw/watchdog.c
@@ -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;
}