From a3c8390d19593b1e5277d95bfb4ab206d4785150 Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Wed, 12 Feb 2014 10:12:04 -0500 Subject: Make DEBUG macro invocations variadic Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek Reviewed-by: Stephen Gallagher Reviewed-by: Simo Sorce --- src/providers/ipa/ipa_id.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/providers/ipa/ipa_id.c') diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c index 56b8c9f05..5f9c84bab 100644 --- a/src/providers/ipa/ipa_id.c +++ b/src/providers/ipa/ipa_id.c @@ -39,7 +39,7 @@ static const char *ipa_account_info_error_text(int ret, int *dp_error, return NULL; } DEBUG(SSSDBG_CRIT_FAILURE, - ("Bug: dp_error is OK on failed request\n")); + "Bug: dp_error is OK on failed request\n"); *dp_error = DP_ERR_FATAL; break; case DP_ERR_OFFLINE: @@ -191,7 +191,7 @@ static struct tevent_req *ipa_id_get_netgroup_send(TALLOC_CTX *memctx, state->op = sdap_id_op_create(state, ctx->conn->conn_cache); if (!state->op) { - DEBUG(2, ("sdap_id_op_create failed\n")); + DEBUG(2, "sdap_id_op_create failed\n"); ret = ENOMEM; goto fail; } @@ -211,7 +211,7 @@ static struct tevent_req *ipa_id_get_netgroup_send(TALLOC_CTX *memctx, clean_name, ctx->opts->netgroup_map[IPA_OC_NETGROUP].name); if (!state->filter) { - DEBUG(2, ("Failed to build filter\n")); + DEBUG(2, "Failed to build filter\n"); ret = ENOMEM; goto fail; } @@ -302,8 +302,8 @@ static void ipa_id_get_netgroup_done(struct tevent_req *subreq) } if (ret == EOK && state->count > 1) { - DEBUG(1, ("Found more than one netgroup with the name [%s].\n", - state->name)); + DEBUG(1, "Found more than one netgroup with the name [%s].\n", + state->name); tevent_req_error(req, EINVAL); return; } -- cgit