diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-02-12 10:12:04 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-02 10:58:19 +0200 |
commit | b0d759c9a604add0573c04b1a4e88e1605e1fdc0 (patch) | |
tree | 15c83ce34cd254a30cc42c212123b7f194c21677 /src/providers/ldap/sdap_refresh.c | |
parent | b9afd88065ecdb9c2cafb2ee767bd61585b31b8f (diff) | |
download | sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.gz sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.xz sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.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
(identical to commit a3c8390d19593b1e5277d95bfb4ab206d4785150):
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_refresh.c')
-rw-r--r-- | src/providers/ldap/sdap_refresh.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/providers/ldap/sdap_refresh.c b/src/providers/ldap/sdap_refresh.c index 819ee4fce..fb2dbc781 100644 --- a/src/providers/ldap/sdap_refresh.c +++ b/src/providers/ldap/sdap_refresh.c @@ -47,7 +47,7 @@ struct tevent_req *sdap_refresh_netgroups_send(TALLOC_CTX *mem_ctx, req = tevent_req_create(mem_ctx, &state, struct sdap_refresh_netgroups_state); if (req == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n"); return NULL; } @@ -63,11 +63,11 @@ struct tevent_req *sdap_refresh_netgroups_send(TALLOC_CTX *mem_ctx, ret = sdap_refresh_netgroups_step(req); if (ret == EOK) { - DEBUG(SSSDBG_TRACE_FUNC, ("Nothing to refresh\n")); + DEBUG(SSSDBG_TRACE_FUNC, "Nothing to refresh\n"); goto immediately; } else if (ret != EAGAIN) { - DEBUG(SSSDBG_CRIT_FAILURE, ("sdap_refresh_netgroups_step() failed " - "[%d]: %s\n", ret, sss_strerror(ret))); + DEBUG(SSSDBG_CRIT_FAILURE, "sdap_refresh_netgroups_step() failed " + "[%d]: %s\n", ret, sss_strerror(ret)); goto immediately; } @@ -104,7 +104,7 @@ static errno_t sdap_refresh_netgroups_step(struct tevent_req *req) goto done; } - DEBUG(SSSDBG_TRACE_FUNC, ("Issuing refresh of netgroup %s\n", name)); + DEBUG(SSSDBG_TRACE_FUNC, "Issuing refresh of netgroup %s\n", name); subreq = ldap_netgroup_get_send(state, state->ev, state->id_ctx, state->id_ctx->opts->sdom, @@ -136,9 +136,9 @@ static void sdap_refresh_netgroups_done(struct tevent_req *subreq) ret = ldap_netgroup_get_recv(subreq, &dp_error, &sdap_ret); talloc_zfree(subreq); if (ret != EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Unable to refresh netgroup [dp_error: %d, " + DEBUG(SSSDBG_CRIT_FAILURE, "Unable to refresh netgroup [dp_error: %d, " "sdap_ret: %d, errno: %d]: %s\n", - dp_error, sdap_ret, ret, sss_strerror(ret))); + dp_error, sdap_ret, ret, sss_strerror(ret)); goto done; } |