From a5838d3ec8bc987930df68545e1e91374ee4fca7 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Thu, 5 Nov 2015 17:49:29 +0200 Subject: 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 Signed-off-by: Tobias Klauser --- lookup.c | 6 ++++-- 1 file 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)); -- cgit v1.2.3-54-g00ecf