Message ID | 20240910221606.1817478-22-pierrick.bouvier@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | Use g_assert_not_reached instead of (g_)assert(0, false) | expand |
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes: > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > --- > migration/dirtyrate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c > index 1d9db812990..a28c07327e8 100644 > --- a/migration/dirtyrate.c > +++ b/migration/dirtyrate.c > @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit) > case TIME_UNIT_MILLISECOND: > return -3; > default: > - assert(false); /* unreachable */ > + g_assert_not_reached(); /* unreachable */ > return 0; > } > } You could drop the comment that's now redundant. Reviewed-by: Fabiano Rosas <farosas@suse.de>
On 9/10/24 15:15, Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > --- > migration/dirtyrate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c > index 1d9db812990..a28c07327e8 100644 > --- a/migration/dirtyrate.c > +++ b/migration/dirtyrate.c > @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit) > case TIME_UNIT_MILLISECOND: > return -3; > default: > - assert(false); /* unreachable */ > + g_assert_not_reached(); /* unreachable */ > return 0; > } > } Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On 9/10/24 15:15, Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> > --- > migration/dirtyrate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c > index 1d9db812990..a28c07327e8 100644 > --- a/migration/dirtyrate.c > +++ b/migration/dirtyrate.c > @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit) > case TIME_UNIT_MILLISECOND: > return -3; > default: > - assert(false); /* unreachable */ > + g_assert_not_reached(); /* unreachable */ > return 0; > } > } Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On Tue, Sep 10, 2024 at 03:15:48PM -0700, Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Peter Xu <peterx@redhat.com>
diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 1d9db812990..a28c07327e8 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit) case TIME_UNIT_MILLISECOND: return -3; default: - assert(false); /* unreachable */ + g_assert_not_reached(); /* unreachable */ return 0; } }
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- migration/dirtyrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)