aboutsummaryrefslogtreecommitdiffstats
path: root/src/queryswdb.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-11-16 15:25:49 +0000
committerWerner Koch <[email protected]>2018-11-16 15:25:49 +0000
commit5857491a2aa7d4975100d90f1ad62c08aa345e3e (patch)
treec433d2da27e7b9f98ca783e15b00087f2ce3d6cd /src/queryswdb.c
parentAdd SPDX identifiers to most source files (diff)
downloadgpgme-5857491a2aa7d4975100d90f1ad62c08aa345e3e.tar.gz
gpgme-5857491a2aa7d4975100d90f1ad62c08aa345e3e.zip
core: Simplify the trace maros by using variadics.
* src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros and remove the TRACE_BEG1 et al. Change all users to always pass a format string. (TRACE): Ditto. * src/debug.c (_gpgme_debugf): New. * configure.ac <GCC>: Add -Wno-format-zero-length. -- This makes it easier for use to enable format checks. The zero-length format is required to allow for an empty format due to the comman problematic of __VA_ARGS__. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/queryswdb.c')
-rw-r--r--src/queryswdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/queryswdb.c b/src/queryswdb.c
index 537de39d..e72dabbc 100644
--- a/src/queryswdb.c
+++ b/src/queryswdb.c
@@ -58,18 +58,18 @@ gpgme_op_query_swdb_result (gpgme_ctx_t ctx)
op_data_t opd;
gpgme_error_t err;
- TRACE_BEG (DEBUG_CTX, "gpgme_op_query_swdb_result", ctx);
+ TRACE_BEG (DEBUG_CTX, "gpgme_op_query_swdb_result", ctx, "");
err = _gpgme_op_data_lookup (ctx, OPDATA_QUERY_SWDB, &hook, -1, NULL);
opd = hook;
if (err || !opd)
{
- TRACE_SUC0 ("result=(null)");
+ TRACE_SUC ("result=(null)");
return NULL;
}
- TRACE_SUC1 ("result=%p", &opd->result);
+ TRACE_SUC ("result=%p", &opd->result);
return &opd->result;
}
@@ -91,8 +91,8 @@ gpgme_op_query_swdb (gpgme_ctx_t ctx, const char *name, const char *iversion,
void *hook;
op_data_t opd;
- TRACE_BEG2 (DEBUG_CTX, "gpgme_op_query_swdb", ctx,
- "name=%s, iversion=%a", name, iversion);
+ TRACE_BEG (DEBUG_CTX, "gpgme_op_query_swdb", ctx,
+ "name=%s, iversion=%", name, iversion);
if (!ctx || reserved)
return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));