Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HAMANO Tsukasa
OpenLDAP
Commits
d1738c3e
Commit
d1738c3e
authored
Apr 12, 2012
by
Hallvard Furuseth
Browse files
Fix MDB_DEBUG in last ITS#7299 commit.
Make DPRINTF usable in if-else. Silence signed vs unsigned warning.
parent
d7935941
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libmdb/mdb.c
View file @
d1738c3e
...
...
@@ -260,11 +260,12 @@ typedef ID txnid_t;
# define DPRINTF (void)
/* Vararg macros may be unsupported */
#elif MDB_DEBUG
static
int
mdb_debug
;
static
in
t
mdb_debug_start
;
static
txnid_
t
mdb_debug_start
;
/** Print a debug message with printf formatting. */
# define DPRINTF(fmt, ...)
/**< Requires 2 or more args */
\
if (mdb_debug) fprintf(stderr, "%s:%d " fmt "\n", __func__, __LINE__, __VA_ARGS__)
((void) ((mdb_debug) && \
fprintf(stderr, "%s:%d " fmt "\n", __func__, __LINE__, __VA_ARGS__)))
#else
# define DPRINTF(fmt, ...) ((void) 0)
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment