Skip to content

Commit 81a8461

Browse files
committed
Wrap 'shout' function into NDEBUG ifdef in DTM.
1 parent 7e0b32c commit 81a8461

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

contrib/pg_xtm/dtmd/include/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ char *join_path(const char *dir, const char *file);
1616
bool inrange(xid_t min, xid_t x, xid_t max);
1717
int falloc(int fd, off64_t size);
1818

19-
#if 1
19+
#ifdef NDEBUG
2020
#define shout(...)
2121
#else
2222
#define shout(...) \

contrib/pg_xtm/dtmd/src/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ static void clear_global_transaction(GlobalTransaction *t) {
6060
}
6161
}
6262

63+
#ifdef NDEBUG
64+
#define shout_cmd(...)
65+
#else
6366
static void shout_cmd(void *client, cmd_t *cmd) {
6467
char *cmdname;
6568
switch (cmd->cmd) {
@@ -77,6 +80,7 @@ static void shout_cmd(void *client, cmd_t *cmd) {
7780
}
7881
shout("\n");
7982
}
83+
#endif
8084

8185
static char *onbegin(void *client, cmd_t *cmd) {
8286
if (transactions_count >= MAX_TRANSACTIONS) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy