diff options
-rw-r--r-- | tests/test-logging.c | 5 | ||||
-rw-r--r-- | util/log.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/test-logging.c b/tests/test-logging.c index b6fa94ee35..cdf13c6ba5 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -73,8 +73,9 @@ static void test_parse_range(void) g_assert_false(qemu_log_in_addr_range(UINT64_MAX - 1)); qemu_set_dfilter_ranges("0..0xffffffffffffffff", &err); - error_free_or_abort(&err); - + g_assert(qemu_log_in_addr_range(0)); + g_assert(qemu_log_in_addr_range(UINT64_MAX)); + qemu_set_dfilter_ranges("2..1", &err); error_free_or_abort(&err); diff --git a/util/log.c b/util/log.c index 4da635c8c9..b6c75b1102 100644 --- a/util/log.c +++ b/util/log.c @@ -204,7 +204,7 @@ void qemu_set_dfilter_ranges(const char *filter_spec, Error **errp) default: g_assert_not_reached(); } - if (lob > upb || (lob == 0 && upb == UINT64_MAX)) { + if (lob > upb) { error_setg(errp, "Invalid range"); goto out; } |