summaryrefslogtreecommitdiffstats
path: root/examples/ph5example.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 17:50:43 (GMT)
committerGitHub <noreply@github.com>2023-07-27 17:50:43 (GMT)
commit05db7c16acc835b609a5894a70394e4f699323cb (patch)
treeda55c523ff164188713c785715c308d47f03e9cf /examples/ph5example.c
parent1fe3fda4edcf26d3f18de13d5f6525f6314e7ae7 (diff)
downloadhdf5-05db7c16acc835b609a5894a70394e4f699323cb.zip
hdf5-05db7c16acc835b609a5894a70394e4f699323cb.tar.gz
hdf5-05db7c16acc835b609a5894a70394e4f699323cb.tar.bz2
Normalize examples w/ develop (#3282)
Diffstat (limited to 'examples/ph5example.c')
-rw-r--r--examples/ph5example.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/ph5example.c b/examples/ph5example.c
index e0fc644..5ec2cdc 100644
--- a/examples/ph5example.c
+++ b/examples/ph5example.c
@@ -46,23 +46,25 @@
/* Define some handy debugging shorthands, routines, ... */
/* debugging tools */
#define MESG(x) \
- if (verbose) \
- printf("%s\n", x);
+ do { \
+ if (verbose) \
+ printf("%s\n", x); \
+ } while (0)
#define MPI_BANNER(mesg) \
- { \
+ do { \
printf("--------------------------------\n"); \
printf("Proc %d: ", mpi_rank); \
printf("*** %s\n", mesg); \
printf("--------------------------------\n"); \
- }
+ } while (0)
#define SYNC(comm) \
- { \
+ do { \
MPI_BANNER("doing a SYNC"); \
MPI_Barrier(comm); \
MPI_BANNER("SYNC DONE"); \
- }
+ } while (0)
/* End of Define some handy debugging shorthands, routines, ... */
/* Constants definitions */