From dfa4d550de4472055de0acbb265986f2d3414922 Mon Sep 17 00:00:00 2001 From: glennsong09 <43005495+glennsong09@users.noreply.github.com> Date: Fri, 17 Mar 2023 11:41:54 -0500 Subject: Enclose MESG in do...while loop (#2576) Enclose MSG macro in a do...while loop --- testpar/testpar.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testpar/testpar.h b/testpar/testpar.h index 6c380a9..58bcab4 100644 --- a/testpar/testpar.h +++ b/testpar/testpar.h @@ -30,8 +30,11 @@ * mesg is not an empty string. */ #define MESG(mesg) \ - if (VERBOSE_MED && *mesg != '\0') \ - HDprintf("%s\n", mesg) + do { \ + if (VERBOSE_MED && *mesg != '\0') { \ + HDprintf("%s\n", mesg); \ + } \ + } while (0) /* * VRFY: Verify if the condition val is true. -- cgit v0.12