diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-02-12 10:12:04 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-02 10:58:19 +0200 |
commit | b0d759c9a604add0573c04b1a4e88e1605e1fdc0 (patch) | |
tree | 15c83ce34cd254a30cc42c212123b7f194c21677 /src/tools/sss_userdel.c | |
parent | b9afd88065ecdb9c2cafb2ee767bd61585b31b8f (diff) | |
download | sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.gz sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.tar.xz sssd-b0d759c9a604add0573c04b1a4e88e1605e1fdc0.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
(identical to commit a3c8390d19593b1e5277d95bfb4ab206d4785150):
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/tools/sss_userdel.c')
-rw-r--r-- | src/tools/sss_userdel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/sss_userdel.c b/src/tools/sss_userdel.c index d61a45711..9eb133288 100644 --- a/src/tools/sss_userdel.c +++ b/src/tools/sss_userdel.c @@ -59,7 +59,7 @@ static int is_logged_in(TALLOC_CTX *mem_ctx, uid_t uid) ret = get_uid_table(mem_ctx, &uid_table); if (ret == ENOSYS) return ret; if (ret != EOK) { - DEBUG(1, ("Cannot initialize hash table.\n")); + DEBUG(1, "Cannot initialize hash table.\n"); return ret; } @@ -98,7 +98,7 @@ static int kick_user(struct tools_ctx *tctx) if (pid == -1) { ret = errno; DEBUG(SSSDBG_CRIT_FAILURE, - ("fork failed [%d]: %s\n", ret, strerror(ret))); + "fork failed [%d]: %s\n", ret, strerror(ret)); return ret; } @@ -109,7 +109,7 @@ static int kick_user(struct tools_ctx *tctx) } } if (child_pid == -1) { - DEBUG(SSSDBG_CRIT_FAILURE, ("waitpid failed\n")); + DEBUG(SSSDBG_CRIT_FAILURE, "waitpid failed\n"); return errno; } } @@ -147,7 +147,7 @@ int main(int argc, const char **argv) ret = set_locale(); if (ret != EOK) { - DEBUG(1, ("set_locale failed (%d): %s\n", ret, strerror(ret))); + DEBUG(1, "set_locale failed (%d): %s\n", ret, strerror(ret)); ERROR("Error setting the locale\n"); ret = EXIT_FAILURE; goto fini; @@ -191,7 +191,7 @@ int main(int argc, const char **argv) ret = init_sss_tools(&tctx); if (ret != EOK) { - DEBUG(1, ("init_sss_tools failed (%d): %s\n", ret, strerror(ret))); + DEBUG(1, "init_sss_tools failed (%d): %s\n", ret, strerror(ret)); if (ret == ENOENT) { ERROR("Error initializing the tools - no local domain\n"); } else { @@ -316,7 +316,7 @@ int main(int argc, const char **argv) done: if (ret) { - DEBUG(1, ("sysdb operation failed (%d)[%s]\n", ret, strerror(ret))); + DEBUG(1, "sysdb operation failed (%d)[%s]\n", ret, strerror(ret)); switch (ret) { case ENOENT: ERROR("No such user in local domain. " |