From ca2aa5609087f45449bb8eef8aec3501ddd2bc3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Fri, 17 Jun 2016 11:59:15 +0200
Subject: [PATCH 01/26] Remove braces from DEBUG statements

---
 src/providers/ad/ad_subdomains.c           |  2 +-
 src/providers/ipa/ipa_sudo_async.c         |  4 ++--
 src/providers/krb5/krb5_child.c            |  2 +-
 src/providers/ldap/sdap.c                  |  2 +-
 src/responder/common/responder_cache_req.c |  4 ++--
 src/responder/ifp/ifp_groups.c             |  2 +-
 src/responder/pam/pam_LOCAL_domain.c       | 34 +++++++++++++++---------------
 src/responder/sudo/sudosrv_get_sudorules.c |  2 +-
 src/tests/cmocka/test_negcache.c           |  2 +-
 src/tests/common_dom.c                     |  4 ++--
 src/util/sss_semanage.c                    |  2 +-
 11 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
index 4bdd2a7adbf104354a33fd382eb175d9c315d356..1aee92cab094ba315e78fd09733291b238b606f6 100644
--- a/src/providers/ad/ad_subdomains.c
+++ b/src/providers/ad/ad_subdomains.c
@@ -1055,7 +1055,7 @@ static void ad_subdomains_get_slave_domain_done(struct tevent_req *req)
                                 ctx->reply_count, ctx->reply,
                                 ctx->root_domain_attrs, &nsubdoms, &subdoms);
     if (ret != EOK) {
-        DEBUG(SSSDBG_OP_FAILURE, ("Cannot process subdomain list\n"));
+        DEBUG(SSSDBG_OP_FAILURE, "Cannot process subdomain list\n");
         tevent_req_error(req, ret);
         return;
     }
diff --git a/src/providers/ipa/ipa_sudo_async.c b/src/providers/ipa/ipa_sudo_async.c
index 79e69ce962fd5cc2df0e9aac10a5469ffd73c6be..1e14fdd57efacce124ed025f59d0675dce112363 100644
--- a/src/providers/ipa/ipa_sudo_async.c
+++ b/src/providers/ipa/ipa_sudo_async.c
@@ -415,7 +415,7 @@ ipa_sudo_fetch_send(TALLOC_CTX *mem_ctx,
     req = tevent_req_create(mem_ctx, &state,
                             struct ipa_sudo_fetch_state);
     if (req == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
         return NULL;
     }
 
@@ -872,7 +872,7 @@ ipa_sudo_refresh_send(TALLOC_CTX *mem_ctx,
 
     req = tevent_req_create(mem_ctx, &state, struct ipa_sudo_refresh_state);
     if (req == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
         return NULL;
     }
 
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index bd7da79358f1c549fcfa2560bc17c649ff2efaf7..259b710f4a857cffc3bce55939274aebec6d0ae5 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -172,7 +172,7 @@ static void revert_changepw_options(krb5_get_init_creds_opt *options)
 
     kerr = set_lifetime_options(options);
     if (kerr != 0) {
-        DEBUG(SSSDBG_OP_FAILURE, ("set_lifetime_options failed.\n"));
+        DEBUG(SSSDBG_OP_FAILURE, "set_lifetime_options failed.\n");
     }
 }
 
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index 686f726667aa862bfbac74ae41621d4f9115282f..9a56d7a142454dd5d4171a0742a8b1c665e9f48e 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -227,7 +227,7 @@ int sdap_extend_map_with_list(TALLOC_CTX *mem_ctx,
     ret = split_on_separator(mem_ctx, extra_attrs, ',', true, true,
                              &extra_attrs_list, NULL);
     if (ret != EOK) {
-        DEBUG(SSSDBG_OP_FAILURE, ("Failed to parse server list!\n"));
+        DEBUG(SSSDBG_OP_FAILURE, "Failed to parse server list!\n");
         return ret;
     }
 
diff --git a/src/responder/common/responder_cache_req.c b/src/responder/common/responder_cache_req.c
index 42faf1fa632499ed7d1e380ad4494da4548453be..a8f846c962394314733c26007d33ef9a7f202b8d 100644
--- a/src/responder/common/responder_cache_req.c
+++ b/src/responder/common/responder_cache_req.c
@@ -920,7 +920,7 @@ static struct tevent_req *cache_req_cache_send(TALLOC_CTX *mem_ctx,
 
     req = tevent_req_create(mem_ctx, &state, struct cache_req_cache_state);
     if (req == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
         return NULL;
     }
 
@@ -1160,7 +1160,7 @@ struct tevent_req *cache_req_send(TALLOC_CTX *mem_ctx,
 
     req = tevent_req_create(mem_ctx, &state, struct cache_req_state);
     if (req == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
         return NULL;
     }
 
diff --git a/src/responder/ifp/ifp_groups.c b/src/responder/ifp/ifp_groups.c
index 0164eecdc56705d5a7817d8dcfe47350f091d42e..3635988430e6b2d7a68a967d762d38d94217a0d1 100644
--- a/src/responder/ifp/ifp_groups.c
+++ b/src/responder/ifp/ifp_groups.c
@@ -497,7 +497,7 @@ static struct tevent_req *resolv_ghosts_send(TALLOC_CTX *mem_ctx,
 
     req = tevent_req_create(mem_ctx, &state, struct resolv_ghosts_state);
     if (req == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
         return NULL;
     }
 
diff --git a/src/responder/pam/pam_LOCAL_domain.c b/src/responder/pam/pam_LOCAL_domain.c
index 4b076146c4d38715b05d67bbe002b95ee54d03ec..7a461054d7f27d1a640074a79cea3b953a3ec3fb 100644
--- a/src/responder/pam/pam_LOCAL_domain.c
+++ b/src/responder/pam/pam_LOCAL_domain.c
@@ -75,22 +75,22 @@ static void do_successful_login(struct LOCAL_request *lreq)
     int ret;
 
     lreq->mod_attrs = sysdb_new_attrs(lreq);
-    NULL_CHECK_OR_JUMP(lreq->mod_attrs, ("sysdb_new_attrs failed.\n"),
+    NULL_CHECK_OR_JUMP(lreq->mod_attrs, "sysdb_new_attrs failed.\n",
                        lreq->error, ENOMEM, done);
 
     ret = sysdb_attrs_add_long(lreq->mod_attrs,
                                SYSDB_LAST_LOGIN, (long)time(NULL));
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_attrs_add_long failed.\n",
                       lreq->error, ret, done);
 
     ret = sysdb_attrs_add_long(lreq->mod_attrs, SYSDB_FAILED_LOGIN_ATTEMPTS, 0L);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_attrs_add_long failed.\n",
                       lreq->error, ret, done);
 
     ret = sysdb_set_user_attr(lreq->domain,
                               lreq->preq->pd->user,
                               lreq->mod_attrs, SYSDB_MOD_REP);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_set_user_attr failed.\n",
                       lreq->error, ret, done);
 
 done:
@@ -109,12 +109,12 @@ static void do_failed_login(struct LOCAL_request *lreq)
     pd->response_delay = 3;
 
     lreq->mod_attrs = sysdb_new_attrs(lreq);
-    NULL_CHECK_OR_JUMP(lreq->mod_attrs, ("sysdb_new_attrs failed.\n"),
+    NULL_CHECK_OR_JUMP(lreq->mod_attrs, "sysdb_new_attrs failed.\n",
                        lreq->error, ENOMEM, done);
 
     ret = sysdb_attrs_add_long(lreq->mod_attrs,
                                SYSDB_LAST_FAILED_LOGIN, (long)time(NULL));
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_attrs_add_long failed.\n",
                       lreq->error, ret, done);
 
     failedLoginAttempts = ldb_msg_find_attr_as_int(lreq->res->msgs[0],
@@ -125,13 +125,13 @@ static void do_failed_login(struct LOCAL_request *lreq)
     ret = sysdb_attrs_add_long(lreq->mod_attrs,
                                SYSDB_FAILED_LOGIN_ATTEMPTS,
                                (long)failedLoginAttempts);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_attrs_add_long failed.\n",
                       lreq->error, ret, done);
 
     ret = sysdb_set_user_attr(lreq->domain,
                               lreq->preq->pd->user,
                               lreq->mod_attrs, SYSDB_MOD_REP);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_set_user_attr failed.\n",
                       lreq->error, ret, done);
 
 done:
@@ -175,32 +175,32 @@ static void do_pam_chauthtok(struct LOCAL_request *lreq)
     }
 
     ret = s3crypt_gen_salt(lreq, &salt);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("Salt generation failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "Salt generation failed.\n",
                       lreq->error, ret, done);
     DEBUG(SSSDBG_CONF_SETTINGS, "Using salt [%s]\n", salt);
 
     ret = s3crypt_sha512(lreq, password, salt, &new_hash);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("Hash generation failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "Hash generation failed.\n",
                       lreq->error, ret, done);
     DEBUG(SSSDBG_CONF_SETTINGS, "New hash [%s]\n", new_hash);
 
     lreq->mod_attrs = sysdb_new_attrs(lreq);
-    NULL_CHECK_OR_JUMP(lreq->mod_attrs, ("sysdb_new_attrs failed.\n"),
+    NULL_CHECK_OR_JUMP(lreq->mod_attrs, "sysdb_new_attrs failed.\n",
                        lreq->error, ENOMEM, done);
 
     ret = sysdb_attrs_add_string(lreq->mod_attrs, SYSDB_PWD, new_hash);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_string failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_attrs_add_string failed.\n",
                       lreq->error, ret, done);
 
     ret = sysdb_attrs_add_long(lreq->mod_attrs,
                                "lastPasswordChange", (long)time(NULL));
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_attrs_add_long failed.\n",
                       lreq->error, ret, done);
 
     ret = sysdb_set_user_attr(lreq->domain,
                               lreq->preq->pd->user,
                               lreq->mod_attrs, SYSDB_MOD_REP);
-    NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"),
+    NEQ_CHECK_OR_JUMP(ret, EOK, "sysdb_set_user_attr failed.\n",
                       lreq->error, ret, done);
 
 done:
@@ -294,17 +294,17 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
                 break;
             }
             ret = sss_authtok_get_password(pd->authtok, &password, NULL);
-            NEQ_CHECK_OR_JUMP(ret, EOK, ("Failed to get password.\n"),
+            NEQ_CHECK_OR_JUMP(ret, EOK, "Failed to get password.\n",
                                lreq->error, ret, done);
 
             pwdhash = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_PWD, NULL);
-            NULL_CHECK_OR_JUMP(pwdhash, ("No password stored.\n"),
+            NULL_CHECK_OR_JUMP(pwdhash, "No password stored.\n",
                                lreq->error, LDB_ERR_NO_SUCH_ATTRIBUTE, done);
             DEBUG(SSSDBG_CONF_SETTINGS,
                   "user: [%s], password hash: [%s]\n", username, pwdhash);
 
             ret = s3crypt_sha512(lreq, password, pwdhash, &new_hash);
-            NEQ_CHECK_OR_JUMP(ret, EOK, ("nss_sha512_crypt failed.\n"),
+            NEQ_CHECK_OR_JUMP(ret, EOK, "nss_sha512_crypt failed.\n",
                               lreq->error, ret, done);
 
             DEBUG(SSSDBG_CONF_SETTINGS,
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index 9095d77ba022ce0f4c6c830ca142a2cdebce8670..0cf8c9be323ddf525b58456fa6c1f78af3b1d44e 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -444,7 +444,7 @@ struct tevent_req *sudosrv_get_rules_send(TALLOC_CTX *mem_ctx,
 
     req = tevent_req_create(mem_ctx, &state, struct sudosrv_get_rules_state);
     if (req == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
         return NULL;
     }
 
diff --git a/src/tests/cmocka/test_negcache.c b/src/tests/cmocka/test_negcache.c
index 8911774e331583bfe5f088ffda4fa5fe96c8ea85..3225417690780b59d7e87255b371913afa694b2d 100644
--- a/src/tests/cmocka/test_negcache.c
+++ b/src/tests/cmocka/test_negcache.c
@@ -83,7 +83,7 @@ mock_nctx(TALLOC_CTX *mem_ctx)
     err = sss_idmap_init(sss_idmap_talloc, nctx, sss_idmap_talloc_free,
                          &nctx->idmap_ctx);
     if (err != IDMAP_SUCCESS) {
-        DEBUG(SSSDBG_FATAL_FAILURE, ("sss_idmap_init failed.\n"));
+        DEBUG(SSSDBG_FATAL_FAILURE, "sss_idmap_init failed.\n");
         talloc_free(nctx);
         return NULL;
     }
diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c
index 1d4800179e54ab876545f4333b864ef3361e6da7..cda1cfb0e85b74104a2c3fedbb2ab443683229c6 100644
--- a/src/tests/common_dom.c
+++ b/src/tests/common_dom.c
@@ -39,7 +39,7 @@ mock_confdb(TALLOC_CTX *mem_ctx,
 
     tmp_ctx = talloc_new(NULL);
     if (tmp_ctx == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
         return ENOMEM;
     }
 
@@ -85,7 +85,7 @@ mock_confdb_domain(TALLOC_CTX *mem_ctx,
 
     tmp_ctx = talloc_new(NULL);
     if (tmp_ctx == NULL) {
-        DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+        DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
         return ENOMEM;
     }
 
diff --git a/src/util/sss_semanage.c b/src/util/sss_semanage.c
index d76677ee746192b83d5aaa01de745a96411c1a38..81068da98db611e55df8ac2de1a55f5980c3e552 100644
--- a/src/util/sss_semanage.c
+++ b/src/util/sss_semanage.c
@@ -203,7 +203,7 @@ static int sss_semanage_user_mod(semanage_handle_t *handle,
     ret = semanage_seuser_modify_local(handle, key, seuser);
     if (ret != 0) {
         DEBUG(SSSDBG_CRIT_FAILURE,
-              ("Could not modify login mapping for %s\n"), login_name);
+              "Could not modify login mapping for %s\n", login_name);
         ret = EIO;
         goto done;
     }
-- 
2.1.0

