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/ldap/sdap_range.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/ldap/sdap_range.c')
-rw-r--r-- | src/providers/ldap/sdap_range.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/providers/ldap/sdap_range.c b/src/providers/ldap/sdap_range.c index c4bf43539..d88def6fa 100644 --- a/src/providers/ldap/sdap_range.c +++ b/src/providers/ldap/sdap_range.c @@ -55,7 +55,7 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx, ret = EOK; } DEBUG(SSSDBG_TRACE_INTERNAL, - ("No sub-attributes for [%s]\n", attr_desc)); + "No sub-attributes for [%s]\n", attr_desc); goto done; } @@ -67,8 +67,8 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx, goto done; } DEBUG(SSSDBG_TRACE_LIBS, - ("Base attribute of [%s] is [%s]\n", - attr_desc, base)); + "Base attribute of [%s] is [%s]\n", + attr_desc, base); /* Next, determine if this is a ranged attribute */ if (strncmp(endptr+1, SDAP_RANGE_STRING, rangestringlen) != 0) { @@ -82,8 +82,8 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx, ret = EOK; } DEBUG(SSSDBG_TRACE_LIBS, - ("[%s] contains sub-attribute other than a range, returning whole\n", - attr_desc)); + "[%s] contains sub-attribute other than a range, returning whole\n", + attr_desc); goto done; } else if (disable_range_retrieval) { /* This is range sub-attribute, but we want to ignore it. @@ -102,8 +102,8 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx, if (!end_range) { ret = EINVAL; DEBUG(SSSDBG_MINOR_FAILURE, - ("Cannot find hyphen in [%s]\n", - endptr + rangestringlen +1)); + "Cannot find hyphen in [%s]\n", + endptr + rangestringlen +1); goto done; } end_range++; /* advance past the hyphen */ @@ -113,8 +113,8 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx, *base_attr = talloc_steal(mem_ctx, base); *range_offset = 0; DEBUG(SSSDBG_TRACE_LIBS, - ("[%s] contained the last set of values for this attribute\n", - attr_desc)); + "[%s] contained the last set of values for this attribute\n", + attr_desc); ret = EOK; goto done; } @@ -124,16 +124,16 @@ errno_t sdap_parse_range(TALLOC_CTX *mem_ctx, *range_offset = 0; ret = errno; DEBUG(SSSDBG_MINOR_FAILURE, - ("[%s] did not parse as an unsigned integer: [%s]\n", - end_range, strerror(ret))); + "[%s] did not parse as an unsigned integer: [%s]\n", + end_range, strerror(ret)); goto done; } (*range_offset)++; *base_attr = talloc_steal(mem_ctx, base); DEBUG(SSSDBG_TRACE_LIBS, - ("Parsed range values: [%s][%d]\n", - base, *range_offset)); + "Parsed range values: [%s][%d]\n", + base, *range_offset); ret = EAGAIN; done: |