summaryrefslogtreecommitdiff
path: root/lookup.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-11-05 17:49:29 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-11-06 09:31:54 +0100
commita5838d3ec8bc987930df68545e1e91374ee4fca7 (patch)
tree11059c6d0b578880b5ad3f77e1f05d712edf764c /lookup.c
parenta7a80a2a69c7c8a4b8fe17b5fd345ddca990e6a6 (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>
Diffstat (limited to 'lookup.c')
-rw-r--r--lookup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lookup.c b/lookup.c
index 36d03da..7533bae 100644
--- a/lookup.c
+++ b/lookup.c
@@ -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));