diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-11-05 17:49:29 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-06 09:31:54 +0100 |
commit | a5838d3ec8bc987930df68545e1e91374ee4fca7 (patch) | |
tree | 11059c6d0b578880b5ad3f77e1f05d712edf764c | |
parent | a7a80a2a69c7c8a4b8fe17b5fd345ddca990e6a6 (diff) |
lookup: Do not panic if conf file does not exist
It is not necessary to do not allow run application if
there is no conf file for port resolving, but instead print
message to stderr.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | lookup.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -39,8 +39,10 @@ void lookup_init_ports(enum ports which) file = lookup_port_files[which]; fp = fopen(file, "r"); - if (!fp) - panic("No %s found!\n", file); + if (!fp) { + fprintf(stderr, "No %s found for ports resolving!\n", file); + return; + } memset(buff, 0, sizeof(buff)); |