diff options
author | Markus Armbruster <armbru@redhat.com> | 2023-02-07 08:51:12 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-02-23 14:10:17 +0100 |
commit | 0ec8384f839844dfcccdc4784b30c9c9e7171b92 (patch) | |
tree | 7863d1708e7d65974959db861abbf7f4ab895d7a /softmmu/rtc.c | |
parent | c40233593ed5732de1676412527e42431e33e62c (diff) |
replay: Simplify setting replay blockers
replay_add_blocker() takes an Error *. All callers pass one created
like this:
error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, "some feature");
Folding this into replay_add_blocker() simplifies the callers, losing
a bit of generality we haven't needed in more than six years.
Since there are no other uses of macro QERR_REPLAY_NOT_SUPPORTED,
replace the remaining one by its expansion, and drop the macro.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230207075115.1525-10-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'softmmu/rtc.c')
-rw-r--r-- | softmmu/rtc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/softmmu/rtc.c b/softmmu/rtc.c index f7114bed7d..4b2bf75dd6 100644 --- a/softmmu/rtc.c +++ b/softmmu/rtc.c @@ -152,11 +152,8 @@ void configure_rtc(QemuOpts *opts) if (!strcmp(value, "utc")) { rtc_base_type = RTC_BASE_UTC; } else if (!strcmp(value, "localtime")) { - Error *blocker = NULL; rtc_base_type = RTC_BASE_LOCALTIME; - error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, - "-rtc base=localtime"); - replay_add_blocker(blocker); + replay_add_blocker("-rtc base=localtime"); } else { rtc_base_type = RTC_BASE_DATETIME; configure_rtc_base_datetime(value); |