summaryrefslogtreecommitdiffstats
path: root/src/responder/sudo/sudosrv.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/responder/sudo/sudosrv.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/responder/sudo/sudosrv.c')
-rw-r--r--src/responder/sudo/sudosrv.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/responder/sudo/sudosrv.c b/src/responder/sudo/sudosrv.c
index e6bd997ec..b821c96cd 100644
--- a/src/responder/sudo/sudosrv.c
+++ b/src/responder/sudo/sudosrv.c
@@ -64,7 +64,7 @@ static void sudo_dp_reconnect_init(struct sbus_connection *conn,
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Reconnected to the Data Provider.\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Reconnected to the Data Provider.\n");
/* Identify ourselves to the data provider */
ret = dp_common_send_id(be_conn->conn,
@@ -78,8 +78,8 @@ static void sudo_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
- be_conn->domain->name));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Could not reconnect to %s provider.\n",
+ be_conn->domain->name);
}
int sudo_process_init(TALLOC_CTX *mem_ctx,
@@ -105,13 +105,13 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
&sudo_dp_interface,
&rctx);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("sss_process_init() failed\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sss_process_init() failed\n");
return ret;
}
sudo_ctx = talloc_zero(rctx, struct sudo_ctx);
if (!sudo_ctx) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing sudo_ctx\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing sudo_ctx\n");
ret = ENOMEM;
goto fail;
}
@@ -126,7 +126,7 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
3, &max_retries);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to set up automatic reconnection\n"));
+ "Failed to set up automatic reconnection\n");
goto fail;
}
@@ -143,18 +143,18 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
CONFDB_DEFAULT_SUDO_TIMED,
&sudo_ctx->timed);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Error reading from confdb (%d) [%s]\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) [%s]\n",
+ ret, strerror(ret));
goto fail;
}
ret = schedule_get_domains_task(rctx, rctx->ev, rctx);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("schedule_get_domains_tasks failed.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "schedule_get_domains_tasks failed.\n");
goto fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("SUDO Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "SUDO Initialization complete\n");
return EOK;
@@ -205,8 +205,8 @@ int main(int argc, const char *argv[])
ret = die_if_parent_died();
if (ret != EOK) {
/* This is not fatal, don't return */
- DEBUG(SSSDBG_OP_FAILURE, ("Could not set up to exit "
- "when parent process does\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit "
+ "when parent process does\n");
}
ret = sudo_process_init(main_ctx,