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/responder/pam/pam_helpers.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/responder/pam/pam_helpers.c')
-rw-r--r-- | src/responder/pam/pam_helpers.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/responder/pam/pam_helpers.c b/src/responder/pam/pam_helpers.c index d2068e57c..1b94f7adf 100644 --- a/src/responder/pam/pam_helpers.c +++ b/src/responder/pam/pam_helpers.c @@ -68,14 +68,14 @@ errno_t pam_initgr_cache_set(struct tevent_context *ev, hret = hash_enter(id_table, &key, &val); if (hret != HASH_SUCCESS) { DEBUG(SSSDBG_MINOR_FAILURE, - ("Could not update initgr cache for [%s]: [%s]\n", - name, hash_error_string(hret))); + "Could not update initgr cache for [%s]: [%s]\n", + name, hash_error_string(hret)); ret = EIO; goto done; } else { DEBUG(SSSDBG_TRACE_INTERNAL, - ("[%s] added to PAM initgroup cache\n", - name)); + "[%s] added to PAM initgroup cache\n", + name); } /* Create a timer event to remove the entry from the cache */ @@ -115,13 +115,13 @@ static void pam_initgr_cache_remove(struct tevent_context *ev, if (hret != HASH_SUCCESS && hret != HASH_ERROR_KEY_NOT_FOUND) { DEBUG(SSSDBG_MINOR_FAILURE, - ("Could not clear [%s] from initgr cache: [%s]\n", + "Could not clear [%s] from initgr cache: [%s]\n", table_ctx->name, - hash_error_string(hret))); + hash_error_string(hret)); } else { DEBUG(SSSDBG_TRACE_INTERNAL, - ("[%s] removed from PAM initgroup cache\n", - table_ctx->name)); + "[%s] removed from PAM initgroup cache\n", + table_ctx->name); } talloc_free(table_ctx); |