aboutsummaryrefslogtreecommitdiffstats
path: root/src/trustlist.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/trustlist.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/trustlist.c')
-rw-r--r--src/trustlist.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/trustlist.c b/src/trustlist.c
index 69f565a0..c7778379 100644
--- a/src/trustlist.c
+++ b/src/trustlist.c
@@ -177,7 +177,7 @@ gpgme_op_trustlist_start (gpgme_ctx_t ctx, const char *pattern, int max_level)
void *hook;
op_data_t opd;
- TRACE_BEG2 (DEBUG_CTX, "gpgme_op_trustlist_start", ctx,
+ TRACE_BEG (DEBUG_CTX, "gpgme_op_trustlist_start", ctx,
"pattern=%s, max_level=%i", pattern, max_level);
if (!ctx || !pattern || !*pattern)
@@ -213,7 +213,7 @@ gpgme_op_trustlist_next (gpgme_ctx_t ctx, gpgme_trust_item_t *r_item)
op_data_t opd;
struct trust_queue_item_s *q;
- TRACE_BEG (DEBUG_CTX, "gpgme_op_trustlist_next", ctx);
+ TRACE_BEG (DEBUG_CTX, "gpgme_op_trustlist_next", ctx, "");
if (!ctx || !r_item)
return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
@@ -245,20 +245,20 @@ gpgme_op_trustlist_next (gpgme_ctx_t ctx, gpgme_trust_item_t *r_item)
free (q);
if ((*r_item)->type == 1)
{
- TRACE_SUC5 ("trust_item=%p: %s: owner trust %s with level %i "
+ TRACE_SUC ("trust_item=%p: %s: owner trust %s with level %i "
"and validity 0x%x", *r_item, (*r_item)->keyid,
(*r_item)->owner_trust, (*r_item)->level,
(*r_item)->validity);
}
else if ((*r_item)->type == 2)
{
- TRACE_SUC5 ("trust_item=%p: %s: UID %s with level %i "
+ TRACE_SUC ("trust_item=%p: %s: UID %s with level %i "
"and validity 0x%x", *r_item, (*r_item)->keyid,
(*r_item)->name, (*r_item)->level, (*r_item)->validity);
}
else
{
- TRACE_SUC5 ("trust_item=%p: %s: unknown type %i with level %i "
+ TRACE_SUC ("trust_item=%p: %s: unknown type %i with level %i "
"and validity 0x%x", *r_item, (*r_item)->keyid,
(*r_item)->type, (*r_item)->level, (*r_item)->validity);
}
@@ -270,7 +270,7 @@ gpgme_op_trustlist_next (gpgme_ctx_t ctx, gpgme_trust_item_t *r_item)
gpgme_error_t
gpgme_op_trustlist_end (gpgme_ctx_t ctx)
{
- TRACE (DEBUG_CTX, "gpgme_op_trustlist_end", ctx);
+ TRACE (DEBUG_CTX, "gpgme_op_trustlist_end", ctx, "");
if (!ctx)
return gpg_error (GPG_ERR_INV_VALUE);