diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-11-15 11:17:36 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-11-15 11:17:36 +0200 |
commit | 2cec73c97140588cadad597391be6c13ee0ab2da (patch) | |
tree | 08eba8c87b786027c91dd3c9b570767ce0688c3c /src/config.c | |
parent | 82ee306d977e2fcb88277b85920b7863ead36312 (diff) | |
download | nssync-master.tar.gz nssync-master.tar.bz2 |
* grecs: Update.
* src/cmdline.opt: New option --pidfile
* src/nssync.c: Pidfile from command line overrides that from configuration.
* src/config.c (config_parse): Fix coredump on empty synclist
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/config.c b/src/config.c index 5ff9280..6ddb2ea 100644 --- a/src/config.c +++ b/src/config.c @@ -388,7 +388,6 @@ synclist_fixup() void config_parse() { - int err = 0; struct grecs_node *tree = grecs_parse(config_file); if (!tree) exit(EX_CONFIG); @@ -399,19 +398,17 @@ config_parse() if (!synclist) { error("nothing to do!"); - err = 1; + exit(EX_CONFIG); } if (synclist_fixup()) - err = 1; + exit(EX_CONFIG); if (sql_host_fixup()) - err = 1; + exit(EX_CONFIG); source_named_conf(); - if (err) - exit(EX_CONFIG); if (lint_mode) exit(0); if (!tempdir) { |