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_selinux_maps.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_selinux_maps.c')
-rw-r--r-- | src/providers/ipa/ipa_selinux_maps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/providers/ipa/ipa_selinux_maps.c b/src/providers/ipa/ipa_selinux_maps.c index 1a210689b..315cc7de4 100644 --- a/src/providers/ipa/ipa_selinux_maps.c +++ b/src/providers/ipa/ipa_selinux_maps.c @@ -127,9 +127,9 @@ ipa_selinux_get_maps_next(struct tevent_req *req, return ENOMEM; } - DEBUG(SSSDBG_TRACE_FUNC, ("Trying to fetch SELinux maps with following " + DEBUG(SSSDBG_TRACE_FUNC, "Trying to fetch SELinux maps with following " "parameters: [%d][%s][%s]\n", base->scope, - state->cur_filter, base->basedn)); + state->cur_filter, base->basedn); subreq = sdap_get_generic_send(state, state->ev, state->opts, state->sh, base->basedn, base->scope, state->cur_filter, @@ -166,7 +166,7 @@ static void ipa_selinux_get_maps_done(struct tevent_req *subreq) if (count > 0) { DEBUG(SSSDBG_TRACE_FUNC, - ("Found %zu user maps in current search base\n", count)); + "Found %zu user maps in current search base\n", count); total_count = count + state->map_count; state->maps = talloc_realloc(state, state->maps, struct sysdb_attrs *, total_count); @@ -192,7 +192,7 @@ static void ipa_selinux_get_maps_done(struct tevent_req *subreq) } if (state->map_count == 0) { - DEBUG(SSSDBG_TRACE_FUNC, ("No SELinux user maps found!\n")); + DEBUG(SSSDBG_TRACE_FUNC, "No SELinux user maps found!\n"); ret = ENOENT; } |