diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-02-12 10:12:04 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-02-12 22:30:55 +0100 |
commit | a3c8390d19593b1e5277d95bfb4ab206d4785150 (patch) | |
tree | 2eb4e5432f4f79a75589c03b1513b656879ebf9c /src/providers/ldap/sdap_async_sudo_timer.c | |
parent | cc026fd9ba386f2197e3217940d597dcad1a26fe (diff) | |
download | sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.tar.gz sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.tar.xz sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.zip |
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 <jhrozek@redhat.com>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async_sudo_timer.c')
-rw-r--r-- | src/providers/ldap/sdap_async_sudo_timer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/providers/ldap/sdap_async_sudo_timer.c b/src/providers/ldap/sdap_async_sudo_timer.c index 27dd41f06..035341909 100644 --- a/src/providers/ldap/sdap_async_sudo_timer.c +++ b/src/providers/ldap/sdap_async_sudo_timer.c @@ -63,7 +63,7 @@ struct tevent_req * sdap_sudo_timer_send(TALLOC_CTX *mem_ctx, /* create request */ req = tevent_req_create(mem_ctx, &state, struct sdap_sudo_timer_state); if (req == NULL) { - DEBUG(SSSDBG_FATAL_FAILURE, ("tevent_req_create() failed\n")); + DEBUG(SSSDBG_FATAL_FAILURE, "tevent_req_create() failed\n"); return NULL; } @@ -75,7 +75,7 @@ struct tevent_req * sdap_sudo_timer_send(TALLOC_CTX *mem_ctx, /* set timer */ timer = tevent_add_timer(ev, req, when, sdap_sudo_timer, req); if (timer == NULL) { - DEBUG(SSSDBG_FATAL_FAILURE, ("tevent_add_timer() failed\n")); + DEBUG(SSSDBG_FATAL_FAILURE, "tevent_add_timer() failed\n"); ret = ENOMEM; goto immediately; } @@ -120,7 +120,7 @@ static void sdap_sudo_timer(struct tevent_context *ev, /* issue request */ state->subreq = state->fn(state, state->sudo_ctx); if (state->subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Unable to issue timed request!\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Unable to issue timed request!\n"); tevent_req_error(req, ENOMEM); return; } @@ -137,8 +137,8 @@ static void sdap_sudo_timer(struct tevent_context *ev, * the possibility of starting another * concurrently */ - DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to set timeout, " - "canceling request!\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Failed to set timeout, " + "canceling request!\n"); talloc_zfree(state->subreq); tevent_req_error(req, ENOMEM); } @@ -169,8 +169,8 @@ static void sdap_sudo_timer_timeout(struct tevent_context *ev, req = talloc_get_type(pvt, struct tevent_req); state = tevent_req_data(req, struct sdap_sudo_timer_state); - DEBUG(SSSDBG_CRIT_FAILURE, ("Request timed out. Is timeout too small?" - " (%lds)!\n", state->timeout)); + DEBUG(SSSDBG_CRIT_FAILURE, "Request timed out. Is timeout too small?" + " (%lds)!\n", state->timeout); talloc_zfree(state->subreq); |