From a00180247558d3aeb1e3ae06d1b6bb6d4bd1adc6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 7 Jul 2017 01:40:07 +0200 Subject: [PATCH] imaxdiv tests: Fix logic. * tests/test-imaxdiv.c (main): Use == instead of =. Reported by Coverity. --- ChangeLog | 6 ++++++ tests/test-imaxdiv.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cba1ebbe6..14fa6fa152 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-07-06 Bruno Haible + + imaxdiv tests: Fix logic. + * tests/test-imaxdiv.c (main): Use == instead of =. + Reported by Coverity. + 2017-07-06 Bruno Haible uninorm/filter: Fix use-after-free bug. diff --git a/tests/test-imaxdiv.c b/tests/test-imaxdiv.c index 79b59a2948..de17d831c6 100644 --- a/tests/test-imaxdiv.c +++ b/tests/test-imaxdiv.c @@ -28,23 +28,23 @@ main (void) { { imaxdiv_t result = imaxdiv (101, 7); - ASSERT (result.quot = 14); - ASSERT (result.rem = 3); + ASSERT (result.quot == 14); + ASSERT (result.rem == 3); } { imaxdiv_t result = imaxdiv (-101, 7); - ASSERT (result.quot = -14); - ASSERT (result.rem = -3); + ASSERT (result.quot == -14); + ASSERT (result.rem == -3); } { imaxdiv_t result = imaxdiv (101, -7); - ASSERT (result.quot = -14); - ASSERT (result.rem = 3); + ASSERT (result.quot == -14); + ASSERT (result.rem == 3); } { imaxdiv_t result = imaxdiv (-101, -7); - ASSERT (result.quot = 14); - ASSERT (result.rem = -3); + ASSERT (result.quot == 14); + ASSERT (result.rem == -3); } return 0; -- 2.39.5