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/ad/ad_access.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/ad/ad_access.c')
-rw-r--r-- | src/providers/ad/ad_access.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/providers/ad/ad_access.c b/src/providers/ad/ad_access.c index 68a292abc..cae075d42 100644 --- a/src/providers/ad/ad_access.c +++ b/src/providers/ad/ad_access.c @@ -139,8 +139,8 @@ parse_filter(TALLOC_CTX *mem_ctx, const char *full_filter, /* Malformed option */ DEBUG(SSSDBG_CRIT_FAILURE, - ("Keyword in filter [%s] did not match expected format\n", - full_filter)); + "Keyword in filter [%s] did not match expected format\n", + full_filter); return EINVAL; } @@ -187,7 +187,7 @@ ad_parse_access_filter(TALLOC_CTX *mem_ctx, &filters, &nfilters); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, - ("Cannot parse the list of ad_access_filters\n")); + "Cannot parse the list of ad_access_filters\n"); goto done; } @@ -198,8 +198,8 @@ ad_parse_access_filter(TALLOC_CTX *mem_ctx, if (ret != EOK) { /* Skip the faulty filter. At worst, the user won't be * allowed access */ - DEBUG(SSSDBG_MINOR_FAILURE, ("Access filter [%s] could not be " - "parsed, skipping\n", filters[i])); + DEBUG(SSSDBG_MINOR_FAILURE, "Access filter [%s] could not be " + "parsed, skipping\n", filters[i]); continue; } @@ -269,7 +269,7 @@ ad_access_send(TALLOC_CTX *mem_ctx, ret = ad_parse_access_filter(state, domain, ctx->sdap_access_ctx->filter, &state->filter); if (ret != EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, ("Could not determine the best filter\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "Could not determine the best filter\n"); ret = ERR_ACCESS_DENIED; goto done; } @@ -361,8 +361,8 @@ ad_access_done(struct tevent_req *subreq) state->cindex++; if (state->clist[state->cindex] == NULL) { DEBUG(SSSDBG_OP_FAILURE, - ("Error retrieving access check result: %s\n", - sss_strerror(ret))); + "Error retrieving access check result: %s\n", + sss_strerror(ret)); tevent_req_error(req, ret); return; } @@ -403,7 +403,7 @@ ad_access_handler(struct be_req *breq) if (strcasecmp(pd->domain, be_ctx->domain->name) != 0) { domain = find_subdomain_by_name(be_ctx->domain, pd->domain, true); if (domain == NULL) { - DEBUG(SSSDBG_OP_FAILURE, ("find_subdomain_by_name failed.\n")); + DEBUG(SSSDBG_OP_FAILURE, "find_subdomain_by_name failed.\n"); be_req_terminate(breq, DP_ERR_FATAL, PAM_SYSTEM_ERR, NULL); return; } |