From: Sebastian Harl Date: Fri, 6 Jun 2014 20:22:04 +0000 (+0200) Subject: sysdbd: Simplified main loop management. X-Git-Tag: sysdb-0.2.0~61^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dc0202c1bb91a4147674957933a804719096ac09;p=sysdb.git sysdbd: Simplified main loop management. --- diff --git a/src/tools/sysdbd/main.c b/src/tools/sysdbd/main.c index b8e97a3..3511a8a 100644 --- a/src/tools/sysdbd/main.c +++ b/src/tools/sysdbd/main.c @@ -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 "