Code

sysdbd: Simplified main loop management.
authorSebastian Harl <sh@tokkee.org>
Fri, 6 Jun 2014 20:22:04 +0000 (22:22 +0200)
committerSebastian Harl <sh@tokkee.org>
Fri, 6 Jun 2014 20:22:04 +0000 (22:22 +0200)
src/tools/sysdbd/main.c

index b8e97a3c3780ec1c01cee7fc88dcd9d28bc41f2d..3511a8a54643a1ea24a6dfda34c986c90d285e0e 100644 (file)
@@ -236,7 +236,7 @@ main_loop(void)
 
        int status = 0;
 
-       while (42) {
+       while (status == 0) {
                size_t i;
 
                plugin_main_loop.do_loop = 1;
@@ -261,10 +261,8 @@ main_loop(void)
                }
 
                /* break on error */
-               if (i < listen_addresses_num) {
-                       status = 1;
+               if (status)
                        break;
-               }
 
                sdb_log(SDB_LOG_INFO, "SysDB daemon "SDB_VERSION_STRING
                                SDB_VERSION_EXTRA " (libsysdb %s%s, pid %i) initialized "