From cc45b9c1fe34fa8bffb92c88a54d87d140ea9884 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 24 May 2020 20:38:43 +0200 Subject: [PATCH] Fix issue in test suite. --- tests/test-obj.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test-obj.h b/tests/test-obj.h index 5615a6d0..8c19762d 100644 --- a/tests/test-obj.h +++ b/tests/test-obj.h @@ -44,8 +44,10 @@ static void testobj_init_set(testobj_t d, const testobj_t s) static void testobj_set(testobj_t d, const testobj_t s) { - testobj_clear(d); - testobj_init_set(d, s); + if (d != s) { + testobj_clear(d); + testobj_init_set(d, s); + } } static void testobj_set_ui(testobj_t d, unsigned int v)