From 86bb24947a6aac8b4fe009bbf7c95f604b23375d Mon Sep 17 00:00:00 2001 From: david Date: Mon, 19 Dec 2011 22:00:17 +0000 Subject: [PATCH] Return 0 on success in read_config_file. --- nmap-update/nmap-update.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nmap-update/nmap-update.c b/nmap-update/nmap-update.c index 950a000b7..77d90efad 100644 --- a/nmap-update/nmap-update.c +++ b/nmap-update/nmap-update.c @@ -575,7 +575,7 @@ static int read_config_file(const char *conf_filename) return -1; } - return -1; + return 0; } @@ -655,7 +655,10 @@ int main(int argc, char *argv[]) if (options.verbose) summarize_options(); - read_config_file(options.conf_filename); + if (read_config_file(options.conf_filename) == -1) { + fprintf(stderr, "Can't read config file %s.\n", options.conf_filename); + exit(1); + } if (try_channels(options.channels, options.num_channels) == 0) return 0;