diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-09 21:59:53 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-09 21:59:53 -0400 |
commit | 3348b3f64d933a8bdaf0f076646cc0073f161db1 (patch) | |
tree | fbbc57841207ad24f377975424231146e90454f1 /pullreqd.c | |
parent | d23940bb9d366037564c2cce3e68adf9c3379182 (diff) |
Moved the main loop into a separate function.
Diffstat (limited to 'pullreqd.c')
-rw-r--r-- | pullreqd.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -79,6 +79,14 @@ int init_config(char *config_file, config **cfg) { return (*cfg != NULL); } +int main_loop(config *cfg, int listen_socket) { + int done = 0; + + for (; !done;) { + break; + } +} + int main(int argc, char **argv) { config *cfg; char *config_file = "test.conf"; @@ -93,13 +101,7 @@ int main(int argc, char **argv) { /* Did we successfully read the config file? */ if (config_read) { - int done = 0; - - for (; !done;) { - break; - } - - exit_status = EXIT_SUCCESS; + exit_status = main_loop(cfg, listen_socket); } syslog(LOG_NOTICE, "pullreqd stopped."); |