summaryrefslogtreecommitdiffstats
path: root/src/tests/sysdb-tests.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-02-12 10:12:04 -0500
committerJakub Hrozek <jhrozek@redhat.com>2014-02-12 22:30:55 +0100
commita3c8390d19593b1e5277d95bfb4ab206d4785150 (patch)
tree2eb4e5432f4f79a75589c03b1513b656879ebf9c /src/tests/sysdb-tests.c
parentcc026fd9ba386f2197e3217940d597dcad1a26fe (diff)
downloadsssd-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/tests/sysdb-tests.c')
-rw-r--r--src/tests/sysdb-tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index f7d84732a..a8177bbd2 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -99,7 +99,7 @@ static int _setup_sysdb_tests(struct sysdb_test_ctx **ctx, bool enumerate)
talloc_free(test_ctx);
return ENOMEM;
}
- DEBUG(3, ("CONFDB: %s\n", conf_db));
+ DEBUG(3, "CONFDB: %s\n", conf_db);
/* Connect to the conf db */
ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db);
@@ -1785,7 +1785,7 @@ static void cached_authentication_with_expiration(const char *username,
now = time(NULL);
expected_expire_date = now + (24 * 60 * 60);
- DEBUG(9, ("Setting SYSDB_LAST_ONLINE_AUTH to [%lld].\n", (long long) now));
+ DEBUG(9, "Setting SYSDB_LAST_ONLINE_AUTH to [%lld].\n", (long long) now);
data->attrs = sysdb_new_attrs(data);
ret = sysdb_attrs_add_time_t(data->attrs, SYSDB_LAST_ONLINE_AUTH, now);