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/ipa/ipa_hosts.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/ipa/ipa_hosts.c')
-rw-r--r-- | src/providers/ipa/ipa_hosts.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/providers/ipa/ipa_hosts.c b/src/providers/ipa/ipa_hosts.c index 1323cac60..64f80f082 100644 --- a/src/providers/ipa/ipa_hosts.c +++ b/src/providers/ipa/ipa_hosts.c @@ -122,7 +122,7 @@ ipa_host_info_send(TALLOC_CTX *mem_ctx, ret = ipa_host_info_next(req, state); if (ret == EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, ("No host search base configured?\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "No host search base configured?\n"); ret = EINVAL; } @@ -169,7 +169,7 @@ static errno_t ipa_host_info_next(struct tevent_req *req, SDAP_ENUM_SEARCH_TIMEOUT), true); if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Error requesting host info\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Error requesting host info\n"); talloc_zfree(state->cur_filter); return EIO; } @@ -232,7 +232,7 @@ ipa_host_info_done(struct tevent_req *subreq) ret = ipa_hostgroup_info_next(req, state); if (ret == EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, ("No host search base configured?\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "No host search base configured?\n"); tevent_req_error(req, EINVAL); return; } else if (ret != EAGAIN) { @@ -255,7 +255,7 @@ ipa_host_info_done(struct tevent_req *subreq) } if (!sdap_has_deref_support(state->sh, state->opts)) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Server does not support deref\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Server does not support deref\n"); tevent_req_error(req, EIO); return; } @@ -268,7 +268,7 @@ ipa_host_info_done(struct tevent_req *subreq) dp_opt_get_int(state->opts->basic, SDAP_ENUM_SEARCH_TIMEOUT)); if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Error requesting host info\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Error requesting host info\n"); tevent_req_error(req, EIO); return; } @@ -307,7 +307,7 @@ static errno_t ipa_hostgroup_info_next(struct tevent_req *req, SDAP_ENUM_SEARCH_TIMEOUT), true); if (subreq == NULL) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Error requesting hostgroup info\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Error requesting hostgroup info\n"); talloc_zfree(state->cur_filter); return EIO; } @@ -340,7 +340,7 @@ ipa_hostgroup_info_done(struct tevent_req *subreq) talloc_zfree(subreq); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, - ("sdap_get_generic_recv failed: [%d]\n", ret)); + "sdap_get_generic_recv failed: [%d]\n", ret); tevent_req_error(req, ret); return; } @@ -385,7 +385,7 @@ ipa_hostgroup_info_done(struct tevent_req *subreq) if (ret != EOK) goto done; if (state->hostgroup_count == 0) { - DEBUG(SSSDBG_FUNC_DATA, ("No host groups were dereferenced\n")); + DEBUG(SSSDBG_FUNC_DATA, "No host groups were dereferenced\n"); } else { state->hostgroups = talloc_zero_array(state, struct sysdb_attrs *, state->hostgroup_count); @@ -411,8 +411,8 @@ ipa_hostgroup_info_done(struct tevent_req *subreq) &hostgroup_name); if (ret != EOK) goto done; - DEBUG(SSSDBG_FUNC_DATA, ("Dereferenced host group: %s\n", - hostgroup_name)); + DEBUG(SSSDBG_FUNC_DATA, "Dereferenced host group: %s\n", + hostgroup_name); state->hostgroups[j] = talloc_steal(state->hostgroups, deref_result[i]->attrs); j++; @@ -425,7 +425,7 @@ done: if (ret == EOK) { tevent_req_done(req); } else { - DEBUG(SSSDBG_OP_FAILURE, ("Error [%d][%s]\n", ret, strerror(ret))); + DEBUG(SSSDBG_OP_FAILURE, "Error [%d][%s]\n", ret, strerror(ret)); tevent_req_error(req, ret); } } |