Split assignment and conditions in the same statement.

Signed-off-by: Jan Safranek <[email protected]>
---

 cgrulesengd.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cgrulesengd.c b/cgrulesengd.c
index 09056b6..f7ef5a8 100644
--- a/cgrulesengd.c
+++ b/cgrulesengd.c
@@ -737,14 +737,16 @@ int main(int argc, char *argv[])
        }
 
        /* Initialize libcgroup. */
-       if ((ret = cgroup_init()) != 0) {
+       ret = cgroup_init();
+       if (ret != 0) {
                fprintf(stderr, "Error: libcgroup initialization failed, %d\n",
                                ret);
                goto finished;
        }
 
        /* Ask libcgroup to load the configuration rules. */
-       if ((ret = cgroup_init_rules_cache()) != 0) {
+       ret = cgroup_init_rules_cache();
+       if (ret != 0) {
                fprintf(stderr, "Error: libcgroup failed to initialize rules"
                                "cache, %d\n", ret);
                goto finished;
@@ -766,7 +768,8 @@ int main(int argc, char *argv[])
        sa.sa_flags = 0;
        sa.sa_restorer = NULL;
        sigemptyset(&sa.sa_mask);
-       if ((ret = sigaction(SIGUSR2, &sa, NULL))) {
+       ret = sigaction(SIGUSR2, &sa, NULL);
+       if (ret) {
                flog(LOG_ERR, "Failed to set up signal handler for SIGUSR2."
                                " Error: %s", strerror(errno));
                goto finished;


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to