From bb82dbc0ecdf1a7a54c2e47093d862e0e5b31a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 4 Oct 2020 08:52:37 +0200 Subject: [PATCH] tests: add missing braces around if/else in macro WEE_NICK_STRDUP_FOR_COLOR (issue #1565) --- tests/unit/gui/test-gui-nick.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/gui/test-gui-nick.cpp b/tests/unit/gui/test-gui-nick.cpp index b275dfd7c..e366ab751 100644 --- a/tests/unit/gui/test-gui-nick.cpp +++ b/tests/unit/gui/test-gui-nick.cpp @@ -55,9 +55,13 @@ extern char *gui_nick_strdup_for_color (const char *nickname); #define WEE_NICK_STRDUP_FOR_COLOR(__result, __nickname) \ nick = gui_nick_strdup_for_color (__nickname); \ if (__result) \ + { \ STRCMP_EQUAL(__result, nick); \ + } \ else \ + { \ POINTERS_EQUAL(NULL, nick); \ + } \ if (nick) \ free (nick);