aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpus.c b/cpus.c
index 7ce0d569b3..34fc203808 100644
--- a/cpus.c
+++ b/cpus.c
@@ -821,8 +821,10 @@ void configure_icount(QemuOpts *opts, Error **errp)
bool align = qemu_opt_get_bool(opts, "align", false);
long time_shift = -1;
- if (!option && qemu_opt_get(opts, "align")) {
- error_setg(errp, "Please specify shift option when using align");
+ if (!option) {
+ if (qemu_opt_get(opts, "align") != NULL) {
+ error_setg(errp, "Please specify shift option when using align");
+ }
return;
}